Updated at 12:25 p.m. ET.

President Obama says that the U.S. will continue to provide Iraq with humanitarian and military assistance, but he ruled out ground troops and reiterated administration calls for Iraq to form a "legitimate" government in order to face the threat from Islamic militants.

Speaking to reporters in the South Lawn of the White House, he also acknowledged that U.S. intelligence had underestimated the speed with which Islamic State militants have advanced on the ground.

"In the absence of an Iraqi government, it is very difficult to get a unified effort by Iraqis against ISIL," the president said, referring to the Islamic State of Iraq in the Levant, also known as ISIS or IS.

"The nature of this problem is not one that a U.S. military can solve," he said. "We can assist ... but we can't do it for them," adding that the situation was "a long-term project."

He added: "We're not moving our embassy any time soon. We're not moving our consulate anytime soon."

Referring to ethnic Yazidis trapped on Sinjar mountain in the country's northwest, where the U.S. has airdropped food and water, Obama said the they needed a safe corridor or some other mechanism to allow them to escape. He said "many people are up there, but they're in the thousands, and moving them is not simple."

He said he'd spoken to British Prime Minister David Cameron and French President Francois Hollande and that the two leaders had offered their support in ending civilian suffering in Iraq.

Obama declined to offer a timetable for the U.S. operation, but said that for now he did not see needing to ask Congress for additional funding.

The president appeared to bristle at a question about whether he had second thoughts about not leaving U.S. troops in Iraq.

He said he was surprised by "the degree to which this issue keeps coming up."

"Under the previous administration, we had turned the country to a sovereign, democratically elected Iraqi government," he said.

"We had offered to leave additional troops," Obama said. "And the Iraqi government, based on its political considerations, in part because Iraqis were tired of a U.S. occupation, declined to provide us those assurances. And on that basis, we left."

Copyright 2016 NPR. To see more, visit http://www.npr.org/.