EDGARTOWN, Mass. — President Obama on Thursday claimed victory in the effort to rescue Yazidi refugees from a mountaintop in Iraq, but said that airstrikes in that country would continue in order to protect Americans and offer assistance to other Iraqis threatened by Sunni militants.

Speaking to reporters during his vacation on Martha’s Vineyard, Mr. Obama declared the siege of Mount Sinjar over, crediting American drops of food and airstrikes.

“I could not be prouder of the men and women of our military who carried out this humanitarian mission almost flawlessly,” the president said.

Mr. Obama did not address the quickly shifting assessments of the situation on the mountain. For more than a week, American officials had described a grim situation involving thousands of refugees who would not be easily moved to safety.