MUSCAT: At least six people have been killed and 28 others wounded in a shooting at a mosque in Oman in a rare act of violence in the Gulf nation.

The attack late on Monday took place in Wadi al-Kabir, a district east of the capital city Muscat, during a major religious eventfor Shia Muslims.

Video from the scene shows people fleeing near the Imam Ali Mosque, its minaret visible, as gunfire rings out followed by a voice saying, "Oh God!”

Four Pakistanis and a policeman were among those killed and at least 28 other people were wounded wounded, Pakistani and Omani authories said.

Omani police said in a statement on Tuesday that three gunmen behind the attack were killed and police officers have "concluded the procedures for dealing with the shooting,” it said.

There was no immediate claim of responsibility for the attack.

"Pakistan strongly condemns the dastardly terrorist attack. We are heartened that the government of Oman has neutralised the attackers,” Pakistan’s foreign ministry said in a statement.

Pakistan’s ambassador to Oman, Imran Ali, visited hospitals and met with the wounded, an embassy statement said, adding, "all Pakistanis residing in Oman are requested to cooperate with the authorities”.

The US Embassy in Muscat issued a security alert following the shooting."US citizens should remain vigilant, monitor local news, and heed directions of local authorities,” the embassy wrote on X.

Such an attack is rare in Oman, a frequent regional mediator with a low crime rate. It comes during the Muslim day of Ashura when Shia Muslims commemorate the seventh-century battlefield martyrdom of Imam Hussein, grandson of Prophet Muhammad (PBUH).

Many Shia mark Ashura by performing a pilgrimage to Imam Hussein’s shrine in the Iraqi city of Karbala. Sunni Muslims commemorate the day through fasting.