On the evening of 15 July 2024, gunmen opened fire near and inside the Imam Ali mosque in the Wadi Kabir area of Muscat, Oman's capital. The mosque, which is Shia Muslim and frequently attended by South Asian expatriates, was hosting worshippers marking the eve of Ashura at the time of the attack. According to a witness account given to the Times of Oman, the assault lasted approximately ninety minutes. Attackers reportedly began firing from a building near the mosque before entering the mosque itself, and some worshippers were taken hostage before being rescued by security forces. Oman's police reported that Omani security forces killed all three attackers during the response. The Pakistani ambassador stated he received calls from Pakistani worshippers trapped inside the mosque, and that information from these calls was used by Omani security forces during their response.
In total, six people were killed in the attack in addition to the three attackers, including one Omani police officer. Pakistan's government said four of its nationals were among the dead, and the Indian embassy in Oman reported that one Indian national was killed and another injured. Local police reported 28 other people were injured. Authorities declared a state of emergency in the Wadi Kabir area following the attack.
The Islamic State later claimed responsibility for the attack, publishing an image via its Amaq News Agency showing the gunmen raising the group's flag. According to police, the three attackers were Omani citizens and were brothers. The Islamic State had a documented history of anti-Shia violence, including during the Syrian Civil War and the Iraq War, but had not previously claimed an attack in Oman, a country where Shia Muslims make up about 5% of the population alongside a majority following Sunni and Ibadi traditions.
In the aftermath, the Pakistani government repatriated the remains of the Pakistani fatalities on 19 July 2024 aboard Pakistan International Airlines flights bound for Islamabad and Lahore for burial. The attack drew international reaction: Pakistani Prime Minister Shehbaz Sharif expressed sadness and offered investigative assistance, and the Pakistani embassy urged its nationals in Oman to cooperate with authorities. The US embassy issued a security alert and cancelled visa appointments the following day. Iran, the UAE, Bahrain, Saudi Arabia, and the Gulf Cooperation Council secretary general each issued statements condemning the attack or expressing solidarity with Oman. News outlets described the attack as rare for Oman, which is generally regarded as a stable Gulf nation.