Six people including four Pakistanis were killed and nearly 30 wounded in a shooting near a Shiite mosque in the Omani capital Muscat, officials said Tuesday, a rare attack in the country that was claimed by Islamic State.

Monday's mosque attack came as Shiites this week mark Ashura, an annual day of mourning that commemorates the seventh-century death in battle of Imam Hussein, regarded by the branch as the rightful successor to the Prophet Mohammed.

"The Royal Oman Police have responded to a shooting incident that occurred in the vicinity of a mosque in the Al-Wadi Al-Kabir area" of the capital, a police statement said.

The three gunmen behind the attack were killed and police officers have "concluded the procedures for dealing with the shooting," it added.

The force gave a toll of six killed, including a police officer. It said 28 people "from various nationalities" were wounded, including rescuers and paramedics.

The Islamic State jihadist group claimed the attack, saying three of its fighters were behind the shootings that targeted "Shiites practising their annual rituals" on the occasion of the holy mourning period of Ashura.

The group's propaganda channel Aamaq said on its Telegram channels that IS fighters "opened fire with machine guns on Shiite" worshippers, before clashing with Omani security forces.

The foreign ministry in Islamabad said at least "four Pakistanis were martyred as a result of gunshots in the dastardly terrorist attack on the Ali bin Abi Talib mosque."

Another 30 Pakistanis were wounded, it added.

One Indian was killed and another was wounded, India's embassy in Oman said on social media platform X.

Footage verified by AFP shows people fleeing the Imam Ali Mosque, its minaret visible, as gunshots ring out.

A voice can be heard saying "oh God" and repeating "oh Hussein".

Speaking to AFP, Pakistan's ambassador to Oman Imran Ali said the Shiite mosque was mostly frequented by south Asian expatriates. Oman is home to at least 400,000 Pakistanis, he said.

- 'Terrorist attack' -

 

Pakistani Prime Minister Shehbaz Sharif said he was "deeply saddened by the terrorist attack".

In a statement on X, he said: "Pakistan stands in solidarity with the Sultanate of Oman and offers full assistance in the investigation."

Iran's foreign ministry spokesman, Nasser Kanani, condemned the shooting as a "divisive" act.

Pakistan's ambassador said the attack started with gunfire from a building adjacent to the mosque as hundreds of people gathered for prayers.

The worshippers were held "hostage" by militants before "they were later freed by Omani forces", Ali told AFP.

He said there was little information on the perpetrators or their possible motive.

"Everyone is being tight-lipped about this," he said, adding that the attack created a "difficult situation".

Earlier on Tuesday, Ali toured hospitals that were treating the wounded.

In a video message on X, he urged Pakistanis in Oman to cooperate with the authorities and avoid the area around the mosque.

"Our officers are on standby for emergency blood donations in the embassy," he said, adding that a hotline has been set up to assist the wounded and their relatives.

The American embassy in Muscat issued a security alert following the shooting and cancelled all visa appointments for Tuesday.

"US citizens should remain vigilant, monitor local news and heed directions of local authorities," it posted on X.

- Investigations underway -

 

Police said "all necessary security measures and procedures have been taken to handle the situation" following the attack.

"The authorities are continuing to gather evidence and conduct investigations to uncover the circumstances surrounding the incident," police added on X.

The area remained cordoned off on Tuesday, with journalists unable to access the mosque, an AFP photographer reported.

Oman has a population of more than four million, of whom upwards of 40 percent are expat workers, mostly from south Asia, according to government figures.

Shiites make up a small minority of Oman's overwhelmingly Muslim population. Most Omanis follow the Sunni or Ibadi branches of the faith.

Several attacks on Shiite mosques have roiled the Gulf in recent years, but this was the first in Oman.

A 2015 suicide attack on a Shiite mosque in Kuwait killed at least 27 worshippers and wounded more than 200. It was claimed by the Sunni extremist Islamic State group.

The same year, Saudi Arabia saw two attacks on Shiite mosques in the space of a week, with at least 25 people killed. The attacks were again claimed by IS, which regards Shiites as heretics.

In 2005, a former teacher opened fire inside a government building in Muscat, killing two people and wounding several others, before shooting himself.