Iraqi government forces are engaged in heavy clashes with Sunni insurgents who have made major advances in the past week.
Parts of the city of Baquba - just 60km (37 miles) from Baghdad - were briefly taken over by the rebels.
Reports say 44 prisoners were killed during fighting at a police station in the city.
The US is deploying up to 275 military personnel to protect staff at its huge embassy in the capital.
The prime minister of Iraq's autonomous Kurdish region, Nechirvan Barzani, has told the BBC he believes Iraq may not stay together as Sunni areas feel neglected by the Shia-dominated Iraqi government.
He said it would be very hard for Iraq to return to the situation that existed before the Sunni militants, spearheaded by the Islamic State in Iraq and the Levant (ISIS), took control of the northern cities of Mosul and Tikrit in a rapid advance last week, and Tal Afar on Monday.
In other developments:
- The Iraqi government issued a statement on Tuesday accusing neighbouring Saudi Arabia of supporting the insurgents and providing them with financial support - allegations Riyadh has rejected
- Turkey has relocated its consulate staff from the southern Iraqi city of Basra to Kuwait because of an increased security risk, its foreign minister has said
- At least eight civilians were reportedly killed and several others injured when a suicide bomber blew himself up at a market selling army uniforms and equipment in central Baghdad
Government sources say Baquba - capital of Diyala province on the northern approaches to Baghdad - saw Sunni rebels take control of several districts on the western outskirts of the city before these were regained by government troops and allied Shia militia.
The 44 prisoners died in an overnight assault by the rebels on a police station in the city, security officials report.
Accounts of who was responsible differ, with Prime Minister Nouri Maliki's security spokesman saying the prisoners were killed by the attacking insurgents, and other officials reporting that they were killed by security forces while attempting to escape.
Analysis: John Simpson, BBC World Affairs editor, Baghdad
Many Sunnis, particularly the conservative ones who started turning against al-Qaeda eight years ago, and enabled the US forces to leave Iraq with what seemed at the time to be dignity, are not at all happy that ISIS should control their towns and villages.
But the danger of the present fight-back by Shia volunteers is that they will victimise ordinary Sunnis, and make them feel that ISIS is the only group that can protect them.
In other words, this has the potential to turn into a clear-cut religious war, with the possibility of mass "cleansing" of civilians and brutality on a large scale.
At Tal Afar, a strategic city west of Mosul in the province of Nineveh, there are reports that reinforcements have arrived to boost government forces trying to recapture the town from rebels. The Iraqi air force is said to have been carrying out strikes in the area.
The city of 200,000 people, which has a mixed Sunni and Shia population, lies between Mosul and the Syrian border and was taken just before dawn on Monday.
In Anbar province to the west of Baghdad, Sunni militants shot down a government helicopter near the city of Falluja, and say they destroyed several tanks in fighting there. They also say army forces fled from a military base near Ramadi, the provincial capital.
Qasem Suleimani, the commander of an elite unit of Iran's revolutionary guards, is reported to be in Baghdad, helping military leaders and Shia militias co-ordinate their campaign against the rebels.
In Vienna, US officials held brief discussions about Iraq with their Iranian counterparts at a meeting about Tehran's nuclear programme, but American officials have been quick to dismiss reports of military collaboration with a major foe.
In a letter to Congress, US President Barack Obama said the 275 military personnel being sent to Iraq would protect US citizens and the embassy in Baghdad, and would remain there until the security situation improved.
President Obama has already ruled out sending in ground troops to fight alongside Iraqi government forces, but drone strikes remain a possibility.
The aircraft carrier USS George HW Bush has been deployed to the Gulf, along with two other US warships.
By Richard Galpin, BBC News, Baghdad
Sources in Baquba have told the BBC that people there are frightened and some have started leaving after the Islamist militants took control of several districts.
Baquba is filled with soldiers and a large number of Shia militiamen who are reported to have pushed the gunmen out.
The jihadists from ISIS already control several towns in the area and now are targeting Baquba - the provincial capital and the last city or town before Baghdad, which lies just an hour's drive away along a major highway.
The situation along the frontlines north of the capital had been quite static for several days, but the militants and their allies amongst the Sunni community are on the move again.
The United Nations says that ISIS fighters have carried out hundreds of summary executions since their offensive began last week, and Sunni militants have posted photos online appearing to show fighters massacring captured Iraqi soldiers.
UN Secretary-General Ban Ki-moon said he was deeply disturbed by the reports of probable war crimes, "terrorist attacks" and other atrocities.
He told reporters in Geneva there was "a real risk of further sectarian violence on a massive scale in Iraq and beyond its borders", and called on the government of Prime Minister Maliki to take a more inclusive approach.
ISIS in Iraq
- ISIS grew out of an al-Qaeda-linked organisation in Iraq
- Estimated 10,000 fighters in Iraq and Syria
- Joined in its offensives by other Sunni militant groups, including Saddam-era officers and soldiers, and disaffected Sunni tribal fighters
- Exploits standoff between Iraqi government and the minority Sunni Arab community, which complains that Shia Prime Minister Nouri Maliki is monopolising power
- ISIS led by Abu Bakr al-Baghdadi, obscure figure regarded as a battlefield commander and tactician