Norwegian police have arrested a man suspected of "terrorism" after two people were killed and 21 wounded in shootings near a gay bar in the capital Oslo on Saturday, causing the city's Pride march to be cancelled.
The suspect, who was already known to the anti-terrorism services, was arrested quickly after the shooting started around 1am in central Oslo.
Norway's domestic intelligence service PST, which is responsible for counter-terrorism, said it was treating the attack as an act of 'Islamist terrorism'.
The suspect "has a long history of violence and threats", PST's chief Roger Berg said.
The suspect had been on the PST's radar "since 2015 in connection with concerns about his radicalisation" and membership "in an extremist network", Berg told a press conference.
Intelligence services spoke to the suspect last month, but did not consider him to have "violent intentions", Berg said.
He added that the PST was also aware the suspect had "difficulties with his mental health".
The suspect's lawyer, John Christian Elden, told Norwegian news agency NTB he expected his client to be put under "judicial observation" to determine his mental state, as is usually done in such cases.
Police had earlier said the suspect was a 42-year-old Norwegian man of Iranian descent.
Norwegian media named him as Zaniar Matapour, describing him as a father of Iranian Kurdish origin who arrived in Norway as a child.
Police said that of the 21 people wounded in the attack, 10 were seriously injured — but none had life-threatening injuries. An automatic weapon and a handgun were also seized.
Police said they received the first reports at 1:14am and the suspect was arrested five minutes later.
They added that the suspect was quickly apprehended thanks to the "heroic contribution" of bystanders.
'We won't disappear'
Organisers of the Pride march due to take place on Saturday afternoon called it off, saying they were following "clear" recommendations from the police.
But thousands of people marched in a spontaneous march of solidarity on Saturday after the attack, shouting: "We're here, we're queer, we won't disappear."
"I think it's fantastic that this march is taking place, otherwise he would have won," a visibly upset participant in her 50s told AFP.
Many people, some in tears, laid rainbow flags and flowers near the scene of the attack, which was cordoned off by police.
"Today is a day that reminds us that Pride is a day we have to fight for — the goal has not yet been reached," Trond Petter Aunas said near the scene.
The shootings happened near the London Pub gay club, the Herr Nilsen jazz club and a takeaway food outlet in a central area packed with people on a warm summer night.
"He looked very determined about where he was aiming. When I realised it was serious, I ran. There was a bleeding man lying on the ground," a woman who saw the incident told the Verdens Gang newspaper.
"There were a lot of injured people on the ground who had head injuries," another witness was quoted by the paper as saying.
'Overwhelmed by grief'
Norway's intelligence services raised the country's threat level, calling the situation "extraordinary".
They were looking into whether other attacks could be possible but said that for the moment "we have no indication of this."
Police presence was stepped up throughout the capital and officers — who do not normally carry guns in Norway — were instructed to arm themselves.
The attack led to enhanced security for Pride marches taking place across France on Saturday, the French government said.
French President Emmanuel Macron expressed his condolences for the victims, calling for unity "in the face of hatred".
According to an NRK radio journalist present at the time of the shooting, the shooter arrived with a bag from which he pulled out a weapon and started firing.
Prime Minister Jonas Gahr Store said: "Today was supposed to be a day to celebrate love and brighten our streets in the colours of the rainbow."
"Instead, we are overwhelmed by grief," he told a press conference.
Norway's King Harald V said in a statement that he was "horrified".
"We have to gather together to defend our values — liberty, diversity and mutual respect," he said.
Generally peaceful Norway was the scene of bloody attacks on July 22, 2011, when right-wing extremist Anders Behring Breivik killed 77 people.