Up to 27 people are reported to have been killed and dozens more injured in a suicide bombing in a Baghdad cafe, a ministry of Interior source has told Al Jazeera.

The source said that a suicide bomber walked into the popular Dubai Cafe crowded with young people late on Thursday and detonated explosives.

The attack occurred ahead of provincial elections scheduled for the weekend.

Al Jazeera's Jane Arraf, reporting from Baghdad, said that the small space in which the suicide bomber detonated meant the injuries were "absolutely horrific."

She said that the Amariyah neighbourhood had been known as an al-Qaeda stronghold before locals turned against the group.

Police said that three children and a woman who were passing by at the time of the blast were among the dead.

The packed internet cafe is on the third floor of the Strawberry mini-mall in the predominantly Sunni neighbourhood of Amiriyah.

An Islamic studies centre, affiliated with the Iraqi Islamic Party, part of the main Sunni political bloc, is located below the top-floor cafe.

Arraf said witnesses reported the force of the blast sent shrapnel and glass flying into an ice cream shop and a pharmacy on the ground floor of the building, severely wounding women and children.

Police said the cafe was full of young people enjoying water pipes and playing pool.

Like other majority Sunni neighbourhoods in Baghdad, Amariyah has been under extremely tight security since anti-government protests started in Sunni provinces and communities in December.

Iraqi officials have said they believe there are still al-Qaeda sleeper cells in the neighbourhood.