OSLO — A 10-day Pride festival in Norway was cut short on Saturday after an early-morning shooting left two people dead and at least 10 others seriously wounded outside a popular gay club in downtown Oslo. The police are investigating the attack as an act of terrorism.
The shooting, on a warm summer night that saw streets filled with revelers, came hours before Oslo was set to host big crowds for its first Pride parade since 2019. The event’s organizers canceled the parade and the rest of the festival, which was to run through Monday, at the suggestion of the police.
“We encourage all of Norway to show solidarity and celebrate Pride at home, in their neighborhoods and towns,” Inger Kristin Haugsevje, the leader of Oslo Pride, said in a statement. Despite the parade’s cancellation, hundreds of people showed up on Saturday for an impromptu march along the route and a rally near the club, waving flags and laying bouquets in a show of unity.
A gunman — who the police said they believed had acted alone — opened fire around 1 a.m. outside two nightclubs and a diner and was detained within minutes. A lawyer for the Oslo police, Christian Hatlo, said that officers had seized two weapons, including a fully automatic one that he described as “not a modern gun.”
The two people killed in the attack were both men, in their 50s and 60s, the police said. Mr. Hatlo said that, along with the 10 people who were seriously wounded, 11 others were left with minor injuries, some caused during a panicked rush to flee the area.
The man they detained, the police said, was a 42-year-old Norwegian citizen who was originally from Iran and had a record of minor crimes. He had also been known to the Norwegian Police Security Service since 2015.
Mr. Hatlo said that the authorities had charged the man with murder, attempted murder and terrorism, adding that the police were investigating the shooting as a terrorist attack because of the number of crime scenes and the number of deaths and injuries. In response, the authorities raised the country’s terrorism threat alert to its highest level.
The man’s defense lawyer could not be immediately reached for comment on Saturday.
Shootings in Norway are rare. Gun owners must be licensed and take safety classes, and a ban on semiautomatic weapons enacted by Parliament — a belated response to a 2011 attack by a far-right gunman who killed 77 people — took effect last year.
The gunman’s motive was still unclear Saturday afternoon, Mr. Hatlo said, but the police were investigating the attack as a hate crime because it occurred outside London Pub, a center of gay nightlife in Oslo. The pub opened in the 1970s and bills itself on its website as “the most-visited gay place in Norway.”
Witnesses to the attack said that there had been a long line to enter the pub, a late-night spot that closes at 3:30 a.m. and that was already packed with partygoers. The gunman arrived at the scene with a bag, picked up a gun and started shooting, Olav Ronneberg, a crime reporter for the Norwegian public broadcaster, NRK, who happened to be in the area, told the outlet.
When the shooting began, people scrambled.
“The line dissolved in seconds,” said Sigurd Storm, a well-known interior designer and blogger who had just left the club when the assault began. “I ran. I saw, to my side, a man falling.”
Mr. Storm said he escaped into a hotel, where he called his mother. “I called her to tell her I love her — in case this was my final hour,” he said, “and she is the person I care about most.”
Jonas Gahr Store, Norway’s prime minister, described the shooting as a “cruel and deeply shocking attack on innocent people.”
“Our thoughts go to those who last night lost someone they love, to those who are injured and those who today feel scared and vulnerable,” Mr. Store said.
Some L.G.B.T.Q. people reacted with shock that such a shooting could happen in a country where gay people are widely accepted, safety is not seen as a major issue and rainbow flags are common in shops and restaurants. Norway, in 1993, was the second country in the world, behind Denmark, to allow same-sex registered partnerships, and same-sex marriage has been legal since 2009. The Norwegian government in April 2022 apologized on the 50th anniversary of the repeal of laws criminalizing sex between men.
On Saturday afternoon, Isack Tronaas, 17, delivered flowers to a memorial about a block away from the bar, where the police had cordoned off the area. He said that he had planned to attend the Pride parade, as he does every year, but he was not sure what he and other L.G.B.T.Q. people in the city would do instead this weekend.
“This is a really hard situation because things like this don’t happen often in Norway,” he said, in tears. “It’s a peaceful country, but people still hate each other. Why can’t people just love each other?”
Herman Ellegard, who said he had been celebrating Pride at a nearby bar, said that the attack had made him feel suddenly unsafe. “We only wish to celebrate love and diversity,” he said, adding that it was “gruesome that some want to ruin the celebration of freedom.”
Masud Gharahkhani, the speaker of Norway’s Parliament, condemned the shooting on his Facebook page. Mr. Gharahkhani, a Norwegian citizen of Iranian origin, said that the Parliament building had hoisted the Pride flag for the first time last Saturday to “celebrate diversity and love.”
“I am proud of that,” he said. “I have seen time after time how hate flourishes in social media when we celebrate queer diversity. That is sad and unacceptable.”
Henrik Pryser Libell reported from Oslo, and Mike Ives from Seoul. Julia Jacobs contributed reporting from Oslo.