CHILMARK, Mass. — President Obama welcomed new leadership in Iraq as “a promising step forward” Monday amid a political and security crisis in Baghdad, saying the only lasting solution is the formation of an inclusive government.

Obama did not mention Prime Minister Nouri al-Maliki but clearly was addressing the embattled incumbent as he called for Iraqi political leaders to work peacefully through a political transition.

“These have been difficult days in Iraq,” Obama said outside his rented vacation home on Martha’s Vineyard. “I’m sure there are going to be difficult days ahead.”

Obama’s remarks came as the United States conducted more airstrikes against the advance of Islamic State militants in northern Iraq. In Washington, Lt. Gen. William Mayville, the director of operations for the Joint Chiefs of Staff, told reporters that the 15 targeted strikes have slowed the Islamic State’s advance but done little to degrade the militants’ capacity as a fighting force.

“In the immediate areas where we’ve focused our strikes we’ve had a very temporary effect,” Mayville said. “I in no way want to suggest that we have effectively contained – or that we are somehow breaking the momentum of the threat posed by” the Islamic State group.

Amid the security threat loomed a potential political crisis. New Iraqi President Fouad Massoum selected the deputy parliament speaker, Haider al-Ibadi, as al-Maliki’s replacement. Al-Maliki accused Massoum of carrying out “a coup against the constitution and the political process” with al-Ibadi’s nomination. Al-Maliki insisted he should maintain his position as prime minister.

The United States is backing the new leadership. Obama said he and Vice President Joe Biden called al-Ibadi on Monday to urge him to form a new cabinet as soon as possible.

“The only lasting solution is for Iraqis to come together and form an inclusive government,” Obama said in brief remarks to reporters.

The Obama administration has begun directly providing weapons to Kurdish forces who have started to make gains against the Islamic State, senior U.S. officials said, but the aid has so far been limited to automatic rifles and ammunition.

Previously, the United States sold arms in Iraq only to the government in Baghdad, which has largely failed in recent years to transfer them to the Kurdish forces in the north, American officials have said. Baghdad made some transfers with American help in recent days, since U.S. airstrikes began.