Saudi Arabia flag
Gunfire has been reported at a Shiite mosque in eastern Saudi Arabia Getty Images

Three are dead and seven wounded at a Shia mosque in east Saudi Arabia following a gun attack that took place during Friday prayers.

The timing of the assault appears to have been planned to cause maximum casualties, occurring when the Imam Rida Mosque in Mahasen, al-Ahsa, would have been packed with worshippers.

Unnamed security sources put the death toll at three with at least seven wounded. The number of casualties was expected to rise as knowledge of the situation developed.

Mohammed al-Nimr, the brother of recently executed Shia cleric Sheikh Nimr al-Nimr, told Associated Press in the immediate aftermath of the attack that a number of wounded had been confirmed and ambulances and security forces had quickly rushed to the scene.

Two gunmen appear to have been involved in the attack, both wearing suicide belts. While one of the attackers was able to detonate his explosive device in an outer courtyard the other was stopped and arrested. Videos shared on social media have shown the time of singe blast as well as footage of worshippers attacking the second militant.

What was initially believed to have been an an ensuing firefight was, in fact, warning shots fired by the security services as they stopped a baying mob from attacking the captured militant.

Saudi Arabia has been plagued by a series of sectarian attacks in over the last year stoked by radical Islamic State (Isis) ideology. The country's eastern Shia governorate has been under a state of emergency since two IS attacks in 2015. At present no individual group has claimed responsibility for the attack.

In August last year the militant group claimed responsibility for a suicide bomb that killed 15. In May, a suicide bomber killed 21 and wounded 81 in the village of al-Qadeeh, again during Friday prayers.

Tensions between the Sunni and Shia communities reached breaking point earlier this month when officials executed Nimr al-Nimr. The incident also sparked a diplomatic stand-off between Iran and Saudi Arabia.