A shooting at a mosque outside Norway's capital that left one person injured is being investigated as a possible act of terrorism, officials said Sunday.

The Oslo Police Department said on Twitter the shooting took place Saturday afternoon at the Al-Noor Islamic Center located in Baerum, a western suburb of Oslo.

Assistant Chief of Police Rune Skjold told reporters on Sunday the suspect, a Norwegian man, appeared to have "far-right" and "anti-immigrant" views that he had previously expressed online.

“We’re investigating this as an attempt at carrying out an act of terrorism,” he told reporters.

TALIBAN KILLS 14, WOUNDS OVER 100 IN KABUL SUICIDE BOMBING AMID US 'PEACE TALKS'

Skjold added that the suspect had expressed sympathy for Vidkun Quisling, the leader of Norway's collaborationist government during the Nazi occupation, local newspaper Budstikka reported. Budstikka also quoted a mosque board member, Irfan Mushtaq, as saying the shooter wore a helmet and a uniform when he entered the mosque.

Mushtaq told Norway's TV2 the shooter came to the mosque carrying two "shotgun-like" weapons and a pistol when he broke through a glass door and opened fire.

Only three people were present in the mosque at the time of the attack while preparing for Sunday’s celebration of the Eid-al-Adha festival, mosque spokesman Waheed Ahmed told Reuters. After firing shots, the gunman was overpowered by two men inside the building before police arrived at the scene.

“These people showed great courage,” Skjold told reporters.

HOW THE TALIBAN REMAINED DOMINANT IN AFGHANISTAN: TERRIFYING TACTICS AND AN ADVANCING WEAPONS ARSENAL

The one man who was injured, a 65-year-old member of the congregation, only sustained "minor injuries" when he helped to overpower the gunman, Budstikka reported.

After the shooting, police went to his residence and said they found his 17-year-old sister dead. Police said the man is a suspect in that death.

Authorities have not identified the suspect.

CLICK HERE FOR THE FOX NEWS APP

Norway's Prime Minister, Erna Solberg, told media that "what happened yesterday are things that should not happen in Norway." She later expressed support for Norway's Muslim community on Twitter.

"Today, Muslims all over Norway celebrate Eid with their loved ones. A celebration that many have been looking forward to, but the attack on the mosque in Bærum creates fear and unrest,' she said. "We must fight hatred and anti-Muslim attitudes."

The mosque had previously implemented extra security measures after a gunman killed 51 people at two mosques in Christchurch, New Zealand, earlier this year, the BBC reported.

The Associated Press contributed to this report.