Norway’s prime minister and members of the royal family joined mourners at a memorial service in Oslo Cathedral on Sunday for the victims of a shooting in the capital’s nightlife district.

A gunman opened fire in central Oslo’s bar area early on Saturday, killing two people — a man in his 50s and and another in his 60s — and injuring more than 20 in what the Norwegian security service called an “Islamist terror act” during the capital’s annual LGBTQ Pride festival.

A suspect is in custody.

The crime scene included the London Pub that is popular with the city’s LGBTQ community but police investigators have said it was unclear whether the motive of the assailant — identified as a 42-year-old Norwegian citizen originally from Iran — was hatred toward sexual minorities.

Jonas Gahr Store speaks during the service
Jonas Gahr Stoere speaks during the service (Javad Parsa/NTB via AP/PA)

Prime Minister Jonas Gahr Stoere said in a speech during the memorial service that “the shooting in the night hours put an end to the Pride parade but it did not stop the fight and the efforts to fight discrimination, prejudice and hatred”.

He also addressed Norway’s Muslim community.

“I know how many of you felt when it turned out that the perpetrator belonged to the Islamic community. Many of you experienced fear and unrest. You should know this: We stand together, we are one community and we are responsible for the community together,” Mr Gahr Stoere said during the church service, which was also attended by Crown Princess Mette-Marit.

Norwegian media have identified the suspect as Oslo resident Zaniar Matapour, who arrived in Norway with his family from a Kurdish part of Iran in the 1990s.

Norway's Crown Princess Mette-Marit
Norway’s Crown Princess Mette-Marit after the service (Javad Parsa/NTB via AP/PA)

The Norwegian domestic security agency, known by its Norwegian acronym PST, said on Saturday it first became aware of the suspect in 2015 and later grew concerned he had become radicalised and was part of an unspecified Islamist network.

On Sunday, Norwegian media outlets reported that Matapour allegedly was in close contact with an Islamic extremist living in Norway who has been known to the Norwegian police for a long time.

The extremist, identified as Arfan Bhatti, is known among other things for his strong anti-gay views, Norwegian public broadcaster NRK said.