The Obama administration has staked its military involvement in Iraq on a critical but unpredictable process that's largely out of its control: the formation of a new, more inclusive government in Baghdad.

U.S. officials are privately pushing, as they have for weeks, for the ouster of Iraqi Prime Minister Nouri al-Maliki, a Shiite. In his place, they want a government that better represents Iraq's sectarian diversity and can more effectively take on Sunni extremists that have swept across Iraq's fertile spine.

The military operation President Barack Obama kicked off Friday appears aimed narrowly at freezing the situation on the ground by blunting the advances of Sunni militants that calls themselves the Islamic State.

The extremist group has surprised U.S. officials with its swift and effective ability to overtake key Iraqi cities and infrastructure. Its takeover of Iraq's largest dam and the threat it posed to the Kurdish city of Erbil, long a haven, were among the reasons the U.S. moved this week.

The airstrikes buy Mr. Obama much-needed time for his broader strategy of starting afresh in Iraq with a new government. The U.S. has previously said it was unlikely to aid Iraqi forces with airstrikes until that point.

Such an outcome is far from certain and the process of finalizing a new Iraqi government could take weeks, if not longer. U.S. officials haven't articulated how the strategy would be changed by either Mr. Maliki's re-election or by a prolonged standoff, casting a cloud of uncertainty over the duration and nature of American airstrikes against Iraq since the end of the war in 2011.

James Jeffrey, who served as the Obama administration's ambassador in Baghdad from 2010 to 2012, said a policy of airstrikes to combat the Islamic State can't work without a new government, given Mr. Maliki's alienation of Iraq's Sunni and Kurdish populations.

"An Iraqi offensive with Maliki in charge would mean a reverse massacre against the Sunnis," he said.

U.S. officials acknowledge the uncertainty in the Iraqi political process.

"There is not a history of Iraq moving quickly to make these kinds of decisions, but we have seen significant progress in just the last few weeks," White House press secretary Josh Earnest said Friday. "So we hope that that momentum will be sustained and that there will be an announcement about a prime minister soon."

Mr. Obama authorized airstrikes after the formation of a new government had moved slowly, White House officials said. But the administration says any additional support from the American military is contingent on the completion of that process.

"Once that Iraqi government is formed, we will be consulting with our partners in the region to review what additional steps we can take to provide support to the Iraqi government and its security forces," a senior administration official said. "That remains our long-term strategy."

Part of the American effort to pressure Baghdad involves vows to form a coalition, including regional states, which would join the U.S. in stepping up support if a new government is formed.

White House officials declined to set a timetable for the end of the current mission, saying only that the offensive will not be prolonged and that the U.S. will not deploy American ground troops.

There are growing indications from Baghdad that Mr. Maliki is committed to serving a third term and will resist U.S. pressure to step down. State of Law, the current ruling coalition, has so far maintained Mr. Maliki would remain its pick, though some Iraqi lawmakers say there has been debate on whether to consider another candidate. On Monday, the group issued a strongly worded statement that suggested there was no such split.

The White House hasn't publicly called for Mr. Maliki to step down, but U.S. officials have done little to counter the perception that they want a new Iraqi leader.

Secretary of State John Kerry traveled to Baghdad in June and met with Mr. Maliki, but also held extensive discussions with other Sunni, Shiite and Kurdish leaders.

Under the Iraqi constitution, a new prime minister should be named by Sunday. There were no signs Friday in Baghdad that lawmakers were any closer to reaching a deal by this weekend—though 11th-hour deals are typical of the political wrangling in Iraq.

Shiite lawmakers close to Mr. Maliki said that despite additional pressure from the president to meet the new deadline, some of them were still pushing the view that Mr. Maliki, as head of the parliamentary bloc that gained the most seats in spring elections, has the constitutional right to be the nominee.

And if he fails at forming a government within the constitutionally allotted 30 days after that, then they would consider other alternatives.

Long-term Iraq watchers are skeptical that Baghdad's central government will emerge as a reliable partner to fight the Islamic State anytime soon. One Iraqi politician suggested to succeed Mr. Maliki, former Prime Minister Ibrahim al-Jaafari, was seen as ineffectual leader who will do little to heal the country's communal rifts, some observers said. As a result, these Iraq experts believe the White House will become increasingly dependent on the Kurds to push back the militants.

"There's a real chance this morphs into a counter-terrorism operation largely run out of Kurdistan," said Kenneth Pollack, who specializes on Iraq at Washington's Brooking Institution.