The attacks in the Shiite Kurdish town, which came just hours after two suicide bombers killed at least six people outside a Baghdad hotel, destroyed two mosques and left 90 people wounded.
The two suicide bombers, wearing explosives belts, blew themselves up during the main weekly Muslim prayers, officials said.
Authorities warned the toll could climb further as more bodies were believed trapped under the rubble at one mosque.
Local authorities immediately imposed a curfew in Khanaqin, which is located 170 kilometres from Baghdad near the border with Iran.
Just hours earlier, at least six people were killed, including a woman and two children, and 40 wounded in Baghdad when suicide bombers detonated an explosives-laden minivan and car outside the Hamra hotel, frequented by foreigners, and near an interior ministry complex.
The complex, in southern Baghdad's Jadriyah district, came to public notice on Sunday when US troops discovered there about 179 mostly Sunni detainees, several of whom had been tortured.
Sectarian tensions
The attacks come less than a month ahead of December 15 legislative elections and are the latest in a line of strikes against Shiites since the al-Qaeda leader in Iraq, Abu Musab al-Zarqawi, declared all-out war on Shiites in mid-September.
The Khanaqin attacks also appeared to target Kurds after their political leaders teamed up with Shiite Arabs to help draft the new constitution which proved deeply unpopular with the Sunni Arab minority, who dominated Saddam Hussein's regime and all previous Iraqi governments.
Kurds, who had been expelled from the province of Diyala under Saddam Hussein, have been returning in force since his fall.
Increasing violence
Elsewhere, the US military said it had killed 32 rebels after more than 50 of them had launched a series of concerted attacks on Thursday against military outposts in Ramadi, west of Baghdad.
At least 2,083 US military personnel have been killed in Iraq since the March 2003 invasion, according to a tally by news agency AFP based on the independent Iraq Coalition Casualty Count.
Senior US officers believe the level of violence will increase in the run-up to the December election, at a time when military analysts suggest some 3,000 foreigners are now fighting alongside home-grown insurgents.
"This level of chaos and violence is going to increase, almost in spite of what we do, between now and the election," according to a senior US commander in Iraq, interviewed before the latest attacks.
In Washington, a US military analyst suggested that as many as 3,000 foreigners are involved in Iraq’s insurgency.
Algerians constituted the highest percentage of the foreign fighters, about 20 percent, followed by Syrians, Yemenis, Sudanese, Egyptians and Saudis, according to Anthony Cordesman, from the Centre for Strategic and International Studies.
