DAMMAM: The Islamic State claimed responsibility for a car blast during Friday prayers outside a Shia mosque in Saudi Arabia's Dammam city which killed four people, including a driver.

The attack was “foiled” by the authorities, the Saudi interior ministry said.

An Islamic State statement named the suicide bomber as Abu Jandal al-Jizrawi and said he had managed to reach his target despite heightened security.

Map of Saudi Arabia.

The Saudi Press Agency reported that a bomber tried to enter a mosque in Dammam and detonated his bomb in the parking lot after being stopped by security guards.

It added that guards approached the car as it was parking and that the driver detonated the bomb.

“When they headed towards it, it exploded killing four people, at least one of them believed to be its driver,” an interior ministry spokesman said.

The Interior Ministry said the blast ─ which set several cars ablaze ─ took place at Al-Anoud mosque.

According to witnesses, the suicide bomber was disguised as a woman.

A witness, identified only as Ahmed, earlier told Reuters he was with his family near the mosque when "a quick explosion" happened. He did not know the cause of the blast.

He said acquaintances at the mosque told him a man was killed along with a bomber when he tried to prevent him from reaching it.

Another witness said a passer-by was also killed in the blast.

Photos posted by journalists on Twitter showed thick black clouds of smoke and a fire blazing at the purported scene of the blast.

PM Nawaz condemns attack

Prime Minister Nawaz Sharif strongly condemned the suicide blast in Dammam.

He deplored the loss of lives and prayed for the early recovery of injured, extended condolences to the government of Saudi Arabia.

Last Friday, a suicide bomber detonated a bomb at a mosque in Shia-majority Qatif during Friday weekly prayers killing 21 people and wounding several others. The self-styled Islamic State (IS) group said in an online statement that it had carried out the deadly suicide bomb attack last week.

Read: Deadly suicide blast at mosque in Saudi Arabia kills 21