Riyadh (AFP) - A suicide bomber attacked a mosque in Shiite-populated eastern Saudi Arabia during Friday prayers, killing four people before worshippers disarmed and tied up his accomplice who had fired on them.

The state Al-Ekhbariya news channel quoted an interior ministry spokesman as saying four people died and 18 were wounded.

An initial ministry toll said two people were killed and seven hurt in the attack at the Al-Rida mosque in Mahasen, a neighbourhood in the eastern Al-Ahsa region.

"We started to pray, and then we were surprised to hear shooting," said Mohammad bin Salman al-Ahmadi, 25, who was slightly injured in the attack.

"We rushed and closed the doors. After that they shot at the door trying to break in. The suicide bomber blew himself up and the door flew open."

Power inside went out, leaving the mosque in darkness and filled with smoke as a second attacker "randomly" shot at worshippers, who tried to hide, Ahmadi said.

"Eventually the worshippers attacked him and took away his gun and took off his suicide belt. We tied him up using our 'shemaghs' and held him till police came," he said, referring to a traditional cloth head covering.

Friday's incident was the latest assault on members of the Sunni-dominated kingdom's Shiite minority, after a string of shootings and bombings claimed by the Islamic State (IS) group.

The interior ministry said two suicide bombers were prevented from entering the mosque by security personnel.

"When security approached to intercept them, one of them responded by blowing himself up at the mosque entrance while an exchange of fire took place with another," it said.

The ministry said the second suspect was injured, and arrested with help from citizens.

"A suicide belt was found in his possession," it said, adding that automatic weapons were also recovered.

- Increased security -

Since deadly attacks claimed by IS last year against Shiite mosques in the kingdom's east, security has been increased and community guards now inspect visitors to houses of worship.

Story continues

Friday's attack happened in an area largely populated by employees of the state-owned Saudi Aramco oil company, a resident said.

Most of Saudi Arabia's Shiites live in the kingdom's Eastern Province which includes Al-Ahsa, an oasis region where much of the kingdom's oil reserves are located.

A video circulated on social media purportedly showed the aftermath of the attack, where several people lay still on a carpet, surrounded by broken glass.

One man could be seen applying a tourniquet to the thigh of a victim whose white robe was soaked with blood.

"People were so angry," and apprehended one of the alleged suspects themselves, the resident told AFP, asking for anonymity.

"Police started shooting in the air so they could take him away."

Another resident said Mahasen is a mostly Sunni neighbourhood, and the mosque that was attacked "is a house that they turned into a mosque."

IS, a Sunni extremist group, has claimed several deadly attacks against Saudi Shiites, whom the jihadists consider heretics, since late 2014.

Friday's bombing was the first against Eastern Province Shiites since October, when a gunman fired on faithful commemorating Ashura in the Qatif area, killing five before police shot him dead.

Ashura is one of the holiest occasions for the Shiite faith.

In June, four Shiites died preventing a suicide bomber from entering the hall of Al-Anoud mosque in Dammam city.

Days earlier, 21 people were killed in another Shiite mosque bombing in Eastern Province.

Groups claiming affiliation with IS said they carried out those blasts and the Ashura shooting.

During Ashura in 2014, gunmen killed seven Shiite worshippers, including children, in the eastern town of Al-Dalwa. The interior ministry said the suspects had links to IS.

The group has also claimed deadly attacks on Saudi security forces.