A late-night bombing at a Baghdad cafe frequented by young men playing billiards and video games killed 27 people on Thursday, just days before Iraq's first elections since US troops withdrew.

The attack was the single deadliest in the country in a month, and comes amid concerns over the credibility of Saturday's provincial elections as Iraq grapples with a spike in violence and an ongoing political crisis.

Thursday's bombing struck at 10:00 pm (1900 GMT) in the mostly-Sunni Amriyah neighbourhood and also wounded more than 50 people, security and medical officials said. Among the dead were at least three children and one woman.

It went off at the Dubai cafe, which lies on the 2nd floor of a small shopping mall that is filled with families as it contains restaurants and clothes shops.

The cafe itself, however, is mostly frequented by young men playing billiards and video games.

The bombing comes ahead of provincial elections on Saturday in which an estimated 13.8 million Iraqis are eligible to vote for more than 8,000 candidates, with 378 seats being contested.

Diplomats have raised questions over the credibility of the vote, however, as a spike in violence has left at least 14 candidates dead and a third of the country's provinces are not even taking part, including two where authorities say security cannot be guaranteed.

Iraqi forces are solely responsible for polling day security, the first time they have been in charge without support from American or other international forces during elections since dictator Saddam Hussein was toppled in 2003.

US forces eventually withdrew from Iraq in December 2011.

The election also comes amid a long-running crisis between Prime Minister Nuri al-Maliki and several of his erstwhile government partners, which officials and diplomats say insurgent groups exploit by using the political differences to enhance their room for manoeuvre on the ground.

The political tensions have been reflected by a rise in deadly violence in recent months. Attacks have killed more than 200 people each full month so far this year, compared to tolls well below that figure for the last three months of 2012, according to AFP data.

And while violence has fallen significantly from the height of Iraq's sectarian war, the country still faces major security challenges, mainly from Sunni militants linked to Al-Qaeda who carry out attacks in a bid to undermine confidence in the Shiite-led government.