Iraqi police said that the blast targeted Noufel cafe near the town of Muqdadiyah, about 90 kilometers (60 miles) north of Baghdad.
Ahmed Ibrahim, a government employee, was shopping near the targeted cafe when he heard a thunderous explosion.
"Everybody rushed to the explosion site and saw charred bodies that were thrown outside the cafe because of the powerful explosion," he said. "The scene was horrible."
An hour later, a bomb went off inside another cafe near Baghdad, killing two people and wounding six, authorities said. Hospital officials confirmed the casualty figures.
During Ramadan, cafes in Iraq become quite crowded as people gather there to break the daily fast. Extremists have targeted crowded cafes this year.
Militants have grown bolder in their attacks as well. Earlier Thursday, insurgents outside the village of Sarha launched mortar rounds at a nearby military base and bombed a communication tower to distract security forces. Then they quickly set up a fake checkpoint on a nearby highway to stop passing vehicles, said Col. Hussein Ali Rasheed, the police chief in nearby Tuz Khormato, about 200 kilometers (125 miles) north of Baghdad.
The corpses of 14 drivers and passengers in a convoy of trucks caught at the checkpoint, all of them Shiites, were later found, each killed by gunshot wounds to the head, Rasheed said.
In the northern city of Beiji, 250 kilometers (155 miles) north of Baghdad, militants shot and killed three off-duty soldiers as they were leaving a restaurant, provincial health official Raed Ibrahim said. The soldiers were on their way to Baghdad from Mosul.
And in the city of Kirkuk, a parked car bomb targeted a passing police patrol on Thursday morning, critically wounding six policemen, police Col. Salah Abdul-Qadir said. Kirkuk is 290 kilometers (180 miles) north of Baghdad.
Also, police said gunmen using pistols fitted with silencers shot and killed four people, including two street cleaners, in three separate incidents in Baghdad. Thursday night, a bomb exploded during a small wedding party held in a house in Baghdad's Amiriyah neighborhood, killing three people and wounding 16 others, including some women and children, police and hospital officials said.
All officials spoke on condition of anonymity as they were not authorized to speak to journalists.
The attacks happened amid the backdrop of the Sunday night attack on the notorious Abu Ghraib prison and another lock-up in Taji, both on the outskirts of Baghdad. Dozens of people, mainly members of the security forces and inmates, were killed in the attacks.
Parliament speaker Osama al-Nujaifi told journalists Thursday that the latest reports indicate that more than 500 prisoners escaped a figure similar to what other Iraqi officials have provided. He said a parliamentary committee is investigating what happened.
"The situation is grave," said al-Nujaifi, a Sunni who frequently has criticized the Shiite prime minister, Nouri al-Maliki. "We don't know who they are and how dangerous they are, but this situation will be reflected negatively on the security situation."
Al-Qaida's Iraq branch claimed responsibility for the prison attacks Tuesday. Interpol issued its security alert Wednesday to warn counties in the region about the fugitives, calling the breakouts "a major threat to global security."
Many of the escaped prisoners were senior members of al-Qaida in Iraq, including some who were facing the death penalty, according to Interpol.
Violence in Iraq has reached levels not seen since 2008, fueling worries of a return to the widespread sectarian killing that pushed the country to the brink of civil war after the 2003 U.S.-led invasion. More than 3,000 people have been killed since April.
Ramadan this year is shaping up to be the bloodiest since 2007, with more than 350 Iraqis killed since the holy month started on July 10, according to an AP count.