A suspect has been arrested after two people were killed and more than a dozen injured in a mass shooting in Oslo.

The shooting happened early on Saturday outside a bar in the downtown area of the Norwegian capital, police said.

Police spokesman Tore Barstad confirmed the arrest, but no other details including a possible motive were immediately known.

Mr Barstad added that it was not clear whether the shooting had any connection to the Pride parade that was to be held on Saturday in Oslo.

Police stand guard at the site of a mass shooting in Oslo, early Saturday, June 25, 2022A few people were killed and more than a dozen injured (Javad M Parsa/NTB/AP)

“Police are in contact with the organisers of the Pride event this Saturday. There will be a continuous assessment of what measures police should take to protect that event and whether this incident has a connection to Pride at all,” Mr Barstad told reporters.

He said medical treatment was being provided to 14 people, eight of whom have been admitted to hospital.

Olav Roenneberg, a journalist from Norwegian public broadcaster NRK, said he witnessed the shooting.

“I saw a man arrive at the site with a bag. He picked up a weapon and started shooting,” Mr Roenneberg told NRK.

“First I thought it was an air gun. Then the glass of the bar next door was shattered and I understood I had to run for cover.”

Police stand guard at the site of a mass shooting in Oslo, early Saturday, June 25, 2022The shooting happened early on Saturday outside a bar in the downtown area of the Norwegian capital (Javad Parsa/NTB/AP)

Norwegian media said the shots were fired outside the London Pub, which describes itself as the most popular gay bar in Oslo since it opened in 1979.

“The shooting outside London Pub in Oslo tonight was a cruel and deeply shocking attack on innocent people,” Prime Minister Jonas Gahr Stoere said in a Facebook post.

He said that while the motive was unclear, the shooting had caused fear and grief in the LGBTQ community.

“We all stand by you,” Mr Gahr Stoere wrote.

Norwegian broadcaster TV2 showed footage of people running down Oslo streets in panic as shots rang out in the background.

Oslo Pride organisers said they were in close contact with the police.

“We are shocked and saddened by the tragic incident, and we are following it closely,” Oslo Pride said in a Facebook statement. “Our thoughts are with the victims and their loved ones.”

Norway is a relatively safe country but has experienced violent attacks by right-wing extremists, including one of the worst mass shootings in Europe in 2011, when a right-wing extremist killed 69 people on the island of Utoya after setting off a bomb in Oslo that left eight dead.

In 2019, another right-wing extremist killed his stepsister and then opened fire in a mosque but was overpowered before anyone there was injured.