"This is going to be a long-term project" that won't end and can't succeed unless Iraqis form an inclusive government in Baghdad capable of keeping the country from breaking apart, Obama said at the White House.
Obama spoke after airstrikes from U.S. fighter jets and a drone killed several small groups of Islamic State extremists that were attacking Kurdish forces and refugees. The military support helped clear the way for aid flights to drop food and water to thousands of starving refugees.
But the help comes too late for many of the religious minorities targeted for elimination by the Islamic State group, which swept past U.S.-trained and equipped Iraqi government forces in recent weeks and now controls much of Iraq.
A delayed response by the Shiite-led government in Baghdad left Kurdish forces struggling to contain the Sunni extremists' advances. With nowhere to go but uphill, Kurdish-speaking Yazidi refugees sought shelter in the mile-high Sinjar mountains, where their ancient religion holds that Noah's ark came to rest.
U.S., Iraqi and British cargo planes dropped tons of food, water, tents and other equipment to the refugees Friday and Saturday. Iraq's defense ministry released a video showing people in the Sinjar mountains rushing to collect food and water as the Iraqi government's fleet of C130 cargo planes dropped 20 tons of aid at a time.
But at least 56 children have died of dehydration in the mountains, UNICEF's spokesman in Iraq, Karim Elkorany, told The Associated Press on Saturday.
British officials estimated Saturday between 50,000 and 150,000 people could be trapped on the mountain.
And Juan Mohammed, a local government spokesman in the Syrian city of Qamishli, told the AP that more than 20,000 starving Yazidis are fleeing across the border, braving gunfire through a tenuous "safe passage" that Kurdish peshmerga forces are trying to protect.
Some women lost their children along the way because of exhaustion and fear, and at least nine Kurdish fighters were killed while defending the columns of refugees, Mohammed said.
"They are barefoot, tired and left everything behind" in Iraq, Mohammed said. Without significant help soon, those who haven't crossed yet "will be subjected to genocide."
The U.S. military officially withdrew its combat forces in late 2011 after more than eight years of war. It returned to battle Friday when the two F/A-18 jets dropped 500-pound bombs on Islamic State fighters outside Irbil.
Gen. Ahmed, the peshmerga spokesman at the Khazer checkpoint on the frontline outside Irbil, said it was a "good hit," but the impact wasn't yet clear. The Kurdish general spoke on condition his last name not be used.
Obama was adamant Saturday that that U.S. troops can't bring peace to Iraq.
"We can conduct airstrikes, but ultimately there's not going to be an American military solution to this problem. There's going to have to be an Iraqi solution that America and other countries and allies support," he said.
The Pentagon said the militants were using the artillery to shell Kurdish forces defending the capital of Iraq's autonomous Kurdish region, home to a U.S. consulate and about three dozen U.S. military trainers.
Iraq's embattled Prime Minister Nouri al-Maliki waited until Monday to call in aerial reinforcements for Kurdish fighters trying to contain the Islamic State's advance. It was his government's first show of cooperation with the semi-autonomous Kurdish regional government since Iraq's second largest city, Mosul, fell to the extremists in June.
And so Kurdish officials were particularly pleased by the return of U.S. air support as well as the military trainers coordinating tactical responses with Kurdish peshmerga forces in the Kurdish capital of Irbil.
"Air strikes are intended to degrade the terrorists' capabilities and achieve strategic gains - and have been very effective, said Iraqi Foreign Minister Hoshyar Zebari, a Kurd.
Many of America's allies have backed the U.S. intervention since the Yazidis plight gained attention. British forces are coordinating aid drops with the U.S. and more broadly, trying to figure out how to help the refugees escape from "a completely unacceptable situation," British Defense Secretary Philip Hammond said.
The Yazidis follow an ancient religion, with roots in Zoroastrianism, which the Islamic State group considers heretical and has vowed to destroy. The extremist group also considers Shiite Muslims to be apostates, and has demanded that Christians convert to Islam, pay a special tax, or be killed.
Hundreds of Yazidi women have been seized by the militants, and their families say some were being held in schools in Mosul, said Kamil Amin, the spokesman for Iraq's Human Rights Ministry.
"We think that the terrorists by now consider them slaves and they have vicious plans for them," Amin told The Associated Press.
The militants have expanded north, west and south from their stronghold in Mosul to capture Iraq's largest hydroelectric dam and reservoir, and occupy Sunni-majority towns almost to Baghdad. They now hold large parts of western Iraq and parts of neighboring Syria. Iraqi government forces have prevented the militants from advancing into Shiite-majority areas in the south, while Kurds have defended the north.
Ethnic and religious minorities fearing slaughter have fled. The U.N. said more than 500,000 people have been displaced by the violence in Iraq since June, bringing this year's total to well over 1 million.
The Islamic State group posted a video online Saturday demonstrating their conquests, including government offices in Kurdish Sinjar and the Mosul Dam, which fell to the militants on Thursday. Militants are seen insulting Kurdish President Massoud Barzani by beating his picture with their shoes and slippers.
The group also claimed responsibility for some of the more than 100 deaths in bombings this week in Baghdad, where a police official said Saturday that nine people were found handcuffed and shot to death in different parts of the city. Morgue officials confirmed the information. Both spoke on the condition of anonymity as they are not authorized to brief the media.
Obama said the U.S. will focus on helping refugees, eliminating terrorists, protecting Americans and keeping "key infrastructure" intact so that the Islamic State group can't permanently cripple Iraq before an inclusive government can form.
Sunnis in Iraq and Syria have "felt dissatisfied and detached and alienated from their respective governments. And that has been a ripe territory for these jihadists and extremists to operate," Obama said. "Rebuilding governance in those areas, and legitimacy for stable, moderate governing in those areas is going to take time."
Associated Press writers Vivian Salama and Sameer N. Yacoub in Baghdad; Diaa Hadid in Dahuk, Iraq; Bassem Mroue in Beirut; Darlene Superville in Washington and Danica Kirka in London contributed to this report.