A gunman who opened fire at a mosque outside Oslo, Norway was stopped by a 65-year-old man who put him in a chokehold, authorities reported on Sunday.

The shooting happened Saturday at the al-Noor Islamic Centre near the Norwegian capital, when the suspect, a man in his 20s, burst through a glass door just after 4 p.m. and started firing, Oslo police official Rune Skjold told reporters.

Retired Pakistani Air Force officer Mohammad Rafiq , 65, approached the attacker first, the mosque said. “I suddenly heard shooting from outside,” Rafiq told the reporters. He intercepted and grabbed the gunman, who stuck his finger in Rafiq’s eye. Another man ran up to help. 

“The man carried two shotgun-like weapons and a pistol. He broke through a glass door and fired shots,” mosque board member Irfan Mushtaq told a private channel in Oslo. 

Rafiq suffered minor injuries, police said. He is being hailed as a hero.

“There is no doubt that the swift and firm response from the persons inside the mosque stopped the aggressor and prevented further consequences,” Skjold told the media persons present on the spot. 

The suspect, a young, white male carrying several guns, had expressed far-right and anti-immigrant views online, said Skjold. The shooter wore body armor and a helmet, police said.

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

According to reports, only three people were inside at the time. They were preparing for the holiest Islamic holiday, Eid-al-Adha, or “Feast of the Sacrifice,” the next day.