A suicide bomber has detonated his explosives at a Shia mosque in eastern Saudi Arabia during Friday prayers, killing at least seven people and wounding several others, witnesses said.

One witness described a huge explosion at the Imam Ali Mosque in a village in the province of Qatif, where more than 150 people were praying.

An activist told the AFP news agency that at least four worshippers were killed, while a source told the Reuters news agency that there appeared to be at least 30 casualties in the attack. More recent estimates have placed the death toll higher.

Pictures posted on social media purported to show the devastation, with dead bodies strewn across the floor and shattered glass covering the courtyard of the mosque.

عاجل: إنتحاري سعودي يفجر نفسه في مسجد في قرية القديح - القطيف - وإرتقاء عدد من الشهداء. pic.twitter.com/bWeqYC1ub9 — القطيف مباشر (@QatifDirect) May 22, 2015

Al Jazeera's Hashem Ahelbarra, reporting from the capital Riyadh, said authorities expected the death toll the rise.

Saudi Arabia's Shia population is mostly based in two oasis districts of the Eastern Province - Qatif on the Gulf coast, and al-Ahsa, southwest of the provincial capital al-Khobar.

Qatif and al-Ahsa have historically been the focal point of anti-government demonstrations.

The kingdom's Shia community accounts for between 10 to 15 percent of the total population. They say they face discrimination in seeking educational opportunities or government employment and that they are referred to disparagingly in text books and by some Sunni officials and state-funded clerics.

They also complain of restrictions on setting up places of worship and marking Shia holidays, and say that Qatif and al-Ahsa receive less state funding than Sunni communities of equivalent size.

The Saudi government denies allegations of discrimination.