Terrified revellers at a gay bar in Oslo hid in a basement and desperately called loved ones as a gunman went on a rampage, killing two people and injuring 21 on the day the city was due to celebrate its annual Pride parade.
Authorities said the suspect, a 42-year-old Norwegian citizen of Iranian origin, was believed to be a radicalised Islamist with a history of mental illness who had been known to intelligence services since 2015.
The suspect will be subjected to a psychiatric evaluation in the coming days as part of the investigation, police said.
The attack took place in the early hours of Saturday (local time), with victims shot inside and outside the London Pub, a longstanding hub of Oslo's LGBTQ scene, as well as in the surrounding streets and at one other bar in the centre of the Norwegian capital.
The deceased were two men in their 50s and 60s, police said.
Ten people were treated for serious injuries, but none of them was believed to be in life-threatening condition. Eleven others had minor injuries.
"Everything indicates that this has been an attack by an Islamist extremist," Prime Minister Jonas Gahr Stoere told a news conference.
Outside the London Pub, people gathered to leave tributes.
Thalia Engblom was among Oslo's residents still reeling in shock.
The 20-year-old said she had been at the bar just a week ago and had "never felt so free and liberated" as she did at the venue.
"Today I feel quite heavy," she told the ABC.
"It's overwhelming. And it's just so insane that this happens in 2022 and in Oslo, in Norway, which is a very liberated country".
Ms Engblom said she felt scared to come to the scene, but had been heartened by the outpouring of public support.
"I just think it's so beautiful that we actually come together in support," she said.
"People put flowers and flags and just show love and that this is not OK and no-one wanted this."
Bili Blum-Jansen, who was in the London Pub, said he fled to the basement to escape the shooting and hid there along with 80 to 100 other people.
"Many called their partners and family, it felt almost as if they were saying goodbye. Others helped calm down those who were extremely terrified," he told TV2.
"I had a bit of panic and thought that if the shooter or shooters were to arrive, we'd all be dead. There was no way out."
Rainbow flags symbolising the Pride community were on prominent display across Oslo this week, but Saturday's planned parade was cancelled at the advice of police.
"Last night the rainbow was coloured black," said Anette Trettebergstuen, Norway's Minister of Culture and Equality and herself a prominent campaigner for LGBTQ rights.
Police believe suspect acted alone
While the official parade was called off, several thousand people held a spontaneous march in central Oslo, waving rainbow flags and chanting in English: "We're here, we're queer, we won't disappear."
Norway's Crown Prince Haakon, his wife Crown Princess Mette-Marit and their youngest child, 16-year-old Prince Sverre Magnus, later joined the Prime Minister and other officials to lay red and white roses near the London Pub.
"We must protect the right in Norway to love whomever we want," Prince Haakon told reporters.
The suspect was detained minutes after embarking on the shooting spree, according to police, who said they believed he acted alone.
Two weapons, including a fully automatic gun, were retrieved from the crime scene, they said.
The man has declined to be interrogated by police, his lawyer John Christian Elden told public broadcaster NRK.
Witnesses described the chaos that erupted inside and outside the London Pub, which has been open since 1979.
"Many people were crying and screaming, the injured were screaming, people were distressed and scared — very, very scared," said Marcus Nybakken, 46, who had left the bar shortly before the shooting and returned later to help.
"My first thought was that Pride was the target, so that's frightening."
Journalist Olav Roenneberg, of broadcaster NRK, said he was in the area at the time and saw a man arrive with a bag, take out a gun and start to shoot: "Then I saw windows breaking and understood that I had to take cover."
World leaders condemn attack
European leaders condemned the shooting, as did the White House.
"I am shocked by the heinous attack on innocent people in Oslo," EU Commission President Ursula von der Leyen tweeted.
French President Emmanuel Macron, writing in both French and Norwegian on his official Twitter account, expressed his sympathies.
"We stand stronger against hate if we stand together," he said.
John Kirby, a spokesperson for the US National Security Council, told reporters the Biden administration had been in touch with Norway to offer condolences and support.
"We're all horrified by the mass shooting in Oslo today targeting the LGBTQI+ community there and our hearts obviously go out to the all the families of the victims," he said.
The Norwegian Police Security Service raised its terror alert level from "moderate" to "extraordinary" — the highest level — after the attack.
The police, who are not normally armed, will carry guns until further notice, it said.
Other major events in the capital went ahead as planned on Saturday, police and organisers said, including a large outdoor music festival and a soccer match between the women's teams of Norway and New Zealand.
The shooting took place just months after Norway marked 50 years since the abolition of a law that criminalised gay sex.
Like its Scandinavian neighbours, Norway is considered progressive on LGBTQ rights. There is widespread support for same-sex marriage, which was legalised in 2009.
In 2016, Norway became one of the world's first countries to allow transgender people to legally change their gender without a doctor's agreement or intervention.
ABC/wires