IRBIL, Iraq — President Obama declared Thursday that U.S. military actions in northern Iraq had broken what he called the siege of a desolate mountain range where tens of thousands of refugees had fled after the Islamic State captured the nearby city of Sinjar.

The declaration came hours before U.S. officials scored a second Iraqi victory, when Prime Minister Nouri al Maliki announced that he would step down without a fight, ending fears of a protracted battle over who would lead the troubled nation. U.S. officials have called for Maliki, a Shiite Muslim, to step aside, blaming his sectarianism for alienating Sunni Muslims who have sided with the Islamic State in that extremist group’s push across Iraq.

The success of the Yazidi mission came quickly; Obama announced only a week ago that he had authorized U.S. military action to prevent the Islamic State from threatening the refugees.

On Thursday, Obama said that it was “unlikely” that U.S. aircraft would drop more food and water over the mountains and that “the majority” of 129 military advisers deployed to Irbil to help plan aid operations would soon depart Iraq.

“Americans should be very proud of our efforts,” Obama said during a brief appearance before reporters in Martha’s Vineyard, where he is on vacation. “Because of the skill and professionalism of our military and the generosity of our people, we broke the … siege of Mount Sinjar, we helped vulnerable people reach safety, and we helped save many innocent lives.”

But humanitarian groups warned that a declaration of victory seemed premature. They noted that at least 100,000 residents of Sinjar have crowded into cities and refugee camps in northern Iraq and that they will need humanitarian assistance for months to come. There is no prospect that Islamic State militants will be pushed from Sinjar soon.

“We don’t know exactly how many are still out there, it’s just too widely dispersed an area,” said one international aid worker who spoke anonymously because he did not have approval from his group’s media relations office. “But what we know is over 100,000 people are going to need to be cared for, for the foreseeable future at least. And that’s on top of what was already a massive crisis in the rest of Iraq with over 1 million people displaced from their homes.”

Kurdish militia fighters who battled Islamic State forces near Sinjar suggested that the humanitarian crisis would not end until Sinjar had been retaken – and that that would require much more aggressive bombing from the United States, a prospect not anticipated in Obama’s current authorizations for the use of force. Those limit U.S. airstrikes to protecting American people and property and preventing Islamic State attacks on the Yazidis.

“The fighting is very heavy at times and the Americans have helped with some airstrikes, but there have not been many,” said Hamid, a militia commander who was one of hundreds of Syrian Kurds who crossed into Iraq to help battle the Islamic State near Sinjar. He agreed to speak but asked that only his first name be used.

On a break back in Syria, where he was reached by phone, Hamid said U.S. bombing strikes had provided only limited assistance.

“They helped us clear a path for the refugees, but it will not be enough to remove Daash from the area,” he said, using the disparaging Arabic acronym for the Islamic State. “With more bombings we could liberate Sinjar and they could all go home.”

At the Pentagon, spokesman Navy Rear Adm. John Kirby said that of the 25 airstrikes mounted by U.S. aircraft since Friday, about half were on targets connected to the Sinjar humanitarian mission. With the Yazidis off the mountains, airstrikes related to their protection seemed unlikely.

Details of the assessment team’s 24-hour visit to the Sinjar mountains suggested that the U.S. aid effort may have provided the refugees more psychological than actual value.

The dozen or so troops who spent time in the mountains reported seeing thousands of military meals-ready-to-eat strewn unopened on the hillsides. The United States dropped 114,000 MREs over six days, with the last delivery of more than 14,000 coming Wednesday night after the visiting assessment team had concluded there were few people still in the mountains.

A senior defense official, who commented on the condition of anonymity because of the sensitivity of the topic, said the final drop had gone ahead because “that shipment already was in the pipeline.”

U.S. officials believe that reports of U.S. airstrikes and the food drops gave Yazidis who had fled to the mountains confidence that they could safely leave. In the days leading up to the assessment, thousands successfully made their way down the mountains and to neighboring Iraqi and Syrian cities.

The assessment team found no bodies in the area it surveyed, and while Kirby said that as many as 4,000 people remained in the mountains, other officials said the assessors had concluded the number might be as low as 1,000. Of those still there, as many as half appeared to be permanent residents or did not want to leave.

Of those who still wanted to go, 90 percent were leaving by truck, the assessment team found.

The Pentagon did not offer any comment to questions about how aggressively the Islamic State had besieged the mountains amid accounts from the region that leave it unclear whether a siege had been imposed. One defense official, who asked not to be identified because of the sensitivity of the subject, said that he would not have used the word to describe what took place.

While early news accounts after Sinjar fell described Islamic State militants hunting down Yazidis to execute them, the Islamic State never described the mountains as a target, as it had done with other military objectives. None of the Yazidi self-defense forces formed to protect the refugees on the mountains reported fighting Islamic State militants, and while Iraqi army helicopters reported taking fire when they flew over Islamic State lines, none was shot down.

One key question that remained a subject of speculation was how many Yazidis were ever trapped on the mountains. The United Nations initially suggested that 40,000 had fled there, and as recently as Tuesday it reported that between 20,000 and 30,000 were likely still there.

U.S. aerial photographs suggested far fewer, but officials were worried that the photos had captured the same people more than once. The trapped Yazidis “kept moving,” the senior defense official said.

In the days leading up to the assessment, thousands successfully made their way out of the mountains and to neighboring Iraqi and Syrian cities, the Pentagon said. Still, they described the assessment team as surprised by how few people it found still on the mountains.

Privately, some blamed the news media for overstating the situation, leading to confusion about how dire the situation was.

International aid officials warned that even though most of the Yazidis are now off the mountains, that’s only the beginning of a long process of caring for yet another group of internally displaced people in a country where as many as a million people have fled their homes since June.

A United Nations statement this week said those arriving suffer from dehydration, malnutrition, exhaustion and physical injuries.

“The Yazidi situation remains a very dynamic and challenging one, and it’s of life-saving importance that people receive help and protection,” said U.N. High Commissioner for Refugees Antonio Guterres. “We are doing all we can in very difficult circumstances to meet the urgent needs.”

The United States, Great Britain, Germany, France and Australia have all agreed to provide supplies to the refugees as well as various levels of military support to the Kurdish fighters battling the Islamic State along various fronts.