Men at a Norway mosque overpowered a gunman who fired shots at them in an alleged terror attack, preventing any loss of life and holding the suspect until police arrived.

Oslo police on Sunday praised the men for their "great courage" in confronting an armed attacker. The shooting took place Saturday inside the al-Noor Islamic Centre in the Bærum municipality, just west of the capital.

“There is no doubt that their efforts prevented this from having entirely different consequences," Rune Skjold of the Oslo police said in a statement.



The suspect, described as a 20-year-old white man from the local area, was not identified by police, but investigators said he had shown far-right and anti-immigrant sentiments. The attack was being investigated as terrorism, and authorities were also investigating a message board post whose author claimed to be the suspect and praised the lethal attacks in March at mosques in Christchurch, New Zealand.

Police are also investigating the suspect's role in the death of his 17-year-old stepsister.

On Saturday, three men were inside the al-Noor Islamic Centre, preparing for Sunday's Eid al-Adha celebrations, Norwegian media reported.

When the suspect, armed with multiple guns, entered the room and began shooting, 65-year-old Mohammad Rafiq tackled him.