Isis has bombed a mosque in Saudi Arabia during Friday prayers exactly a week after an almost identical attack.

At least four people died when a suicide bomber blew himself up as people gathered outside the Imam Hussein mosque in the port city of Dammam this morning.

He was reportedly disguised as a woman wearing a burqa and detonated the explosives after being stopped by suspicious volunteer guards.

A video from inside the mosque showed the moment the explosion was heard outside, with prayers being interrupted by blasts and people rising to their feet and shouting in the ensuring panic.

Mohammed Idris, an eyewitness, told the Associated Press that the bomber attempted to enter the mosque but was chased by young men who had set up checkpoints at the entrance.

He named one of the dead as Abdul-Jalil Arbash, a 25-year-old graduate from an American university, although his death could not be confirmed.

Firefighters at the scene of the bombing after putting the blaze out using foam (Reuters)

“They chased the suicide bomber when he tried to enter the women's section of the mosque in the south entrance,” Mr Idris said.

Ali Jaafar, another witness, said the explosion set several cars on fire in the car park.

“It was big and loud,” he added. “The whole thing was very disturbing.”

It was the Sunni extremist group’s latest attack on Shia Muslims in the country, following a similar bombing that killed 21 people at a mosque in Qatif on 22 May.

Demonstrators in Saudi's Shia east marched to condemn the 22 May attack on a mosque in al-Qadeeh (Getty)

The Saudi Press Agency praised the guards who prevented the bomber entering the mosque on Friday.

“Thank God, security authorities managed to foil a terrorist crime targeting worshippers,” the agency said in a statement.

Isis claimed responsibility for the attack on a Facebook page used by its followers, naming the bomber as Abu Jandal al-Jazrawi and calling him a “soldier of the caliphate”.

He blew himself up among “an evil gathering of those filth in front of one of their shrines in Dammam”, the statement continued.

A young relative weeps during a mass funeral held on May 25 in the village of Kudeih, for the victims of a mosque bombing carried out by the Islamic State (MOHAMMED AL-SHAIKH/AFP/Getty Images)

It called on Sunnis to “purify the land of the two shrines from the atheist rafida,” referring to Shias.

Isis has repeatedly called for attacks on Saudi Arabia, which is part of the US-led coalition conducting air strikes against the group in Syria and is providing training to fighters battling the extremists.

Saudi religious authorities had asked women to keep away from mosques during Friday prayers because of fears of a repeat attack and the lack of female security staff able to search them.