Washington said US companies were evacuating hundreds of staff from a major air base north of Baghdad as the militants battled security forces just 80 kilometres from city limits.
With militants closing in on the capital, forces from Iraq's autonomous Kurdish region took control of a swathe of territory they have sought to rule for decades against the objections of successive governments in Baghdad.
Obama said Iraq was going to need "more help from the United States and from the international community" to strengthen security forces that Washington spent billions of dollars in training and equipping before withdrawing its own troops in 2011.
The interior ministry said security forces had adopted a new security plan for the capital to protect it from the advancing militants.
More From This Section
"The plan consists of intensifying the deployment of forces, and increasing intelligence efforts and the use of technology such as (observation) balloons and cameras and other equipment," ministry spokesman Brigadier General Saad Maan told AFP.
"We have been in a war with terrorism for a while, and today the situation is exceptional."
Militants were gathering today for a new attempt to take the city of Samarra, home to a revered Shiite shrine whose 2006 bombing sparked a sectarian war, witnesses said.
Residents of Samarra, just 110 kilometres north of the capital, said gunmen were gathering to the north, east and southeast of the city.
A tribal leader said militants had approached the security forces in the city, asking them to leave peacefully and promising not to harm the Al-Askari shrine.
But security forces had refused, he said.
Militants already mounted two assaults on Samarra, one on Wednesday and one late last week, which were thwarted after heavy fighting.