Iraqi security forces have been battling Sunni-led militants from the Islamic State of Iraq and the Levant (ISIL) as the insurgents sought to push toward the capital, Baghdad.
The army and police said militants overnight attacked and took control of parts of the city of Baquba, 60 kilometers north of Baghdad, but security forces eventually repelled the assault on June 17.
Residents and officials said scores were killed in the fighting, including many prisoners from the local jail, although there were conflicting accounts of how they had died.
Baquba is the capital of Diyala, an ethnically and religiously mixed province that saw some of the worst violence of the 2003-11 U.S. occupation.
Elsewhere, militants controlled most of Tal Afar, a city some 420 kilometers northwest of Baghdad.
Security forces and civilian fighters still held parts of the city on June 17, however.
ISIL insurgents have already taken over Mosul, Iraq's second-largest city, and Tikrit, north of Baghdad.
Later on June 17, Iraqi Prime Minister Nuri al-Maliki sacked several top security force commanders, including the commander of the northern Nineveh Province, the first province to fall in the militant assault.
In response to the deteriorating security situation in Iraq, the United States has deployed up to 275 troops to provide security for the U.S. Embassy in Baghdad.
President Barack Obama is meeting with congressional leaders on June 18 at the White House to discuss this situation in Iraq, said Senate Minority Leader Mitch McConnell (Republican-Kentucky).
The meeting follows a classified briefing by the administration for members of the Senate Armed Services Committee on June 12 on the situation in Iraq.
Obama has ruled out military action in Iraq, but has said that he is keeping his options open as the administration decides how to react to the stunning advance of the Islamic State of the Levant (ISIL) against Iraqi security forces in recent days.
Iraqi Prime Minister Nuri al-Maliki has issued a joint appeal for national unity.
The call came after Shi'ite, Sunni and Kurdish leaders met behind closed doors in Baghdad on June 17.
In an address broadcast on Iraqi TV, al-Maliki's Shi'ite predecessor Ibrahim al-Jafaari read a statement denouncing "terrorist powers" and supporting Iraqi sovereignty.
Earlier, al-Maliki's office issued a statement accusing Saudi Arabia of giving ISIL "financial and moral support."
Maliki's statement came just days after Saudi Arabia and Qatar blamed "sectarian" policies by Iraq's Shi'ite-led government against the Sunni Arab minority for the unrest that has swept the country.
Meanwhile, UN Secretary-General Ban Ki-moon on June 17 urged Maliki to hold dialogue to try to stop the sectarian violence.
Ban, speaking in Geneva, added that governments who neglect human rights are creating "breeding grounds for extremism and terrorism."
With reporting by Reuters, AP, and AFP