OSLO — An early morning shooting near a popular gay club in downtown Oslo that killed two people and seriously wounded at least 10 was being investigated as an act of terrorism, the police said on Saturday, as Norwegians grappled with a rare gun attack that shattered an expected Pride weekend celebration.
The shooting, on a warm summer night, came hours before the city was scheduled to host big crowds for its first Pride parade since the start of the coronavirus pandemic. The event’s organizers canceled the parade and other events connected to a 10-day Pride festival 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.
The gunman, who opened fire outside two nightclubs, was detained shortly after the shooting, the police said. Christian Hatlo, a lawyer for the police, told reporters that the man in custody was a 42-year-old Norwegian citizen who was originally from Iran and had a record of minor crimes. The man’s defense lawyer could not immediately be reached.
Mr. Hatlo said that the authorities had charged him with murder, attempted murder and terrorism. He said they were investigating the shooting as a terrorist attack because of the number of crime scenes and the size of the death and injury tolls.
“He seems to have had the intention to create fear in the population,” Mr. Hatlo said.
In addition to the 10 people who were seriously wounded, 11 others were lightly injured, some during a panicked rush to flee the scene, Mr. Hatlo said. He added that the police had seized two weapons, including a fully automatic one that he described as “not a modern gun.”
Shootings are rare in Norway. 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 that killed 77 people — took effect last year.
The police have reason to assume that the attack was a hate crime because one of the three venues was London Pub, a center of gay nightlife in Oslo, Mr. Hatlo said. The pub, which lies a few blocks from Norway’s Parliament building, opened in the 1970s.
Norway’s prime minister, Jonas Gahr Store, described the shooting as a “cruel and deeply shocking attack on innocent people.” The mayor of Oslo, Raymond Johansen, called it “gruesome.”
Some L.G.B.T. people reacted with shock 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. Same-sex marriage has been legal since 2009, and 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 he had planned to attend the Pride parade, as he does every year, but he wasn’t 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 when the shooting happened, said 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.