A gun shooting took place on Saturday in Al-Noor Islamic Center in Baerum, a municipality just west of Oslo, Norway, causing two wounded including the attacker.
One person of Norwegian ethnic background was arrested shortly after, and Norwegian police announced that they had control of the perpetrator, public broadcaster NRK reported.
According to newspaper Aftenposten, five or seven people were present during the prayer after which three people remained in the mosque when the shooting took place and one person was shot in the leg.
Irfan Mushtaq, a board member of the Al-Noor Islamic Center, told local media Budstikka that one of their members "has been shot by a white man wearing a helmet and uniform".
"A person dressed in uniform with two shotgun-like guns entered the mosque. He started shooting around, but fortunately one of our members managed to overpower the shooter," Mushtaq told newspaper Aftenposten.
It was a 75-year-old man that managed to stop the perpetrator, the newspaper wrote. The perpetrator was injured as well, it said.
"Nothing indicates that there have been more people involved," Norwegian police announced on Twitter.
Several weapons have also been found inside the mosque, the police told public broadcaster NRK.
The perpetrator resides in the vicinity of the mosque, and was known to police from before, Norwegian police said in a press release.
He is said to be a white male in 20s and, according to broadcaster TV2, he has praised online Australian shooter Brenton Harrison Tarrant that killed 49 Muslims in the New Zealand massacre in May.
Norwegian police are now working to assess the security situation since Eid al-Adha, the second significant religious festival of Islam, will start on Sunday.
"It is too early to speculate on the cause and motive for the shooting that happened at a mosque in Baerum on Saturday," Norwegian Prime Minister Erna Solberg told news agency NTB.
Solberg expressed her compassion to those who were in the mosque when the attack happened, NTB reported.
"It is dramatic that the shooting happened inside the mosque in Baerum. Whatever the background, this creates fear and unrest among Muslims preparing for the holiday. We send thoughts and support to Muslims in Norway today," Jonas Gahr Store, leader of Labor party wrote on Twitter.
A spokesman for the Islamic Cultural Center Norway, Ikhlaq Ahmad, said in a press release that they condemn the attack on the mosque in Baerum, and that they will step up security around Sunday's Eid prayer, when several thousand people will gather.
Al-Noor Islamic Center is a Muslim religious community founded in 1983. A number of events are held to mark religious holidays and promote community engagement with members.