President Obama has been pushing for regime change for Iraq since late June, The Daily Beast has learned.

No, Obama has not proposed toppling Iraq’s government by force like his predecessor once did. But the president has instructed his diplomats in Washington and Baghdad to find an alternative to Iraqi Prime Minister Nouri al-Maliki. Since June those diplomats have quietly supported a member of Maliki’s own political party to be the next prime minister. On Sunday, the effort appeared to pay off, when a majority of Shi’ite politicians threw their weight behind Haidar al-Abadi, leading to Iraq’s president to instruct him to begin forming a new government.

“We have been working very quietly on the ground and sending messages to various parties that al-Abadi is a viable alternative,” one U.S. official told The Daily Beast.

The American push—which has not been previously reported—wasn’t the only factor that led to al-Abadi’s rise. Iraq’s deterioration in recent months led some of Maliki’s Shi'ite backers to pull their support of him. Last month, Grand Ayatollah Ali Sistani, the most senior cleric of the Shi'ite sect, wrote a letter to Maliki asking him not to seek a third term as prime minister.

But al-Abadi has been the United States’ preferred candidate since late June to replace Maliki, a man who Obama himself blamed over the weekend for creating the conditions for the current catastrophe that is engulfing Iraq. U.S. and Iraqi officials tell The Daily Beast that U.S. Ambassador to Iraq Robert Beecroft and Brett McGurk, the deputy assistant secretary of state for Iraq and Iran, have pushed Iraqi politicians behinds the scenes to consider al-Abadi as a new Iraqi head of state.

In July, for example, Beecroft personally asked Ahmad Chalabi, a member of Iraq’s parliament who led Iraq’s U.S.-backed opposition to Saddam Hussein in the 1990s, to abandon his run for deputy speaker of Iraq’s parliament, according to Iraqi and U.S. officials. Other Iraqi Shi’ite political leaders also urged Chalabi to drop his challenge.

On July 15, Chalabi won 107 votes and al-Abadi won 149 in the first round of voting inside the parliament for the position. The first deputy speakership was one of the only contested positions in the new parliament following Iraqi elections this spring. Chalabi bowed out of the contest in the second round, giving al-Abadi an easy victory.

But the deputy speakership was just a stepping-stone to the top job for al-Abadi. On Sunday evening in Baghdad, he won a majority of votes from the national alliance—the coalition of Iraqi Shi’ite political parties that includes Maliki’s own Dawa organization. On Monday morning Iraqi President Fouad Massoum asked al-Abadi to begin forming a new government.

The political engineering shows that the U.S. intervention in Iraq is much broader than what President Obama portrayed on Thursday as a fairly straightforward twin mission to blunt ISIS’s advance in northern Iraq and save trapped ethnic minorities there. The CIA has begun providing weapons to Kurdish fighters battling ISIS. And President Obama now says the American operation there could take months, and will ensure that ISIS “is not engaging in actions that could cripple a country.”

A U.S. official who works closely on Iraqi politics told The Daily Beast that it would be wrong to consider al-Abadi as an American puppet. “He’s not our guy, but he is someone we can work with who is not the current guy,” this official said. “We think he will govern more inclusively and govern more with an eye with what is better for Iraq than the current situation.”

Obama until June had taken a hands-off approach to Maliki. While Maliki prosecuted leading Sunni politicians, alienated members of the western Iraqi tribes that fought with the United States between 2007 and 2009 against Jihadists and further consolidated power, Obama agreed to sell Maliki’s air force advanced fighter jets.

That policy has changed. Obama on Saturday said the United States was ready to give extraordinary assistance to Iraq, provided that Iraqi leaders form a more inclusive government.

On Saturday, Obama himself could barely contain his contempt for Maliki. At one point Obama said even if he left U.S. troops in Iraq after 2011, the country would still be unraveling because of the political choices Maliki's own government made to indiscriminately punish his country's Sunni minority.

James Jeffrey, who served as U.S. ambassador in Baghdad between 2010 and 2012, declined to discuss the specifics of the U.S. strategy to find an alternative to Maliki. But he said, “The Americans were pointing out that the Shi’ia coalition had to decide who they would support against Maliki in order to have a single challenger against him.”

Jeffrey said U.S. leverage in Iraq increased considerably as well over the weekend. Jeffrey said Obama’s decision to authorize airstrikes on Thursday evening “demonstrated that he was willing to assist our allies on the ground in a way that can be very effective.” That message was underlined this weekend as well when the United States began sending arms directly to Kurdish Peshmerga forces.

Al-Abadi himself has been well known to U.S. officials since 2003, when he was the communications minister in the interim government formed during the first months after the toppling of Saddam Hussein. Born in Iraq, al-Abadi speaks fluent English from his time in exile in the United Kingdom. Until this summer, al-Abadi was loyal to Maliki and a member of his own Dawa party.

In a June 30 interview with the Huffington Post, al-Abadi defended Maliki to a degree, saying it was not true that Maliki had alienated Iraq’s Sunni minority. But he also acknowledged that there were excesses from Iraq’s security services in the prosecution of their campaign against ISIS.

While the U.S. campaign for al-Abadi was a quiet one until Monday, senior U.S. officials are beginning to express their support for him more openly. Vice President Joe Biden on Monday called al-Abadi to convey congratulations from President Obama.

“While we believe it is up to the Iraqi people to choose their next leaders, we certainly believe that we have interests there,” a U.S. official who works closely on Iraq policy said. “We think he will govern better for the Iraqi people and we will be able to work with him.”