President Obama pulled U.S. forces out of Iraq in 2011 because he couldn’t get Iraq’s parliament to offer U.S. soldiers immunity from Iraqi prosecution. But now Obama is promising to send in hundreds of special operations forces based on a written promise that these soldiers will not be tried in Iraq’s famously compromised courts for actions they are taking in defense of Baghdad.

The U.S. military and Secretary of Defense Chuck Hagel have opposed sending any special operations teams to Iraq until there is a written agreement from Iraq’s government that they will not be prosecuted under Iraqi law. On Monday, the White House spokesman said those promises were provided in an exchange of diplomatic notes. The delay in getting that agreement is one of many reasons why the Pentagon and the White House were reluctant to support air strikes inside Iraq—despite lobbying from Secretary of State John Kerry and his aides.

“We remain confident that the military advisers will have the protections they need,” said Bernadette Meehan, a spokesperson for the National Security Council. “They are going to Iraq with the full support of the Iraqi government. We are working through the mechanism for assurances and we hope to [have it] resolved soon.”

The debate has echoes of 2011, when then-Secretary of State Hillary Clinton favored keeping more troops in Iraq past 2011 than President Obama.

According to multiple administration officials involved in the process, senior members of the State Department have argued internally that limited U.S. air strikes against the Islamic State of Iraq and al-Sham (ISIS) are needed—along with more direct assistance to the Baghdad government—to push back the terrorist group.

If air strikes are going to be effective, however, they would require at least some U.S. forces to provide the intelligence on what individuals, equipment, and buildings should be targeted. At least some of the 300 special operators Obama is sending to Iraq are supposed to prepare those assessments of ISIS—as well as evaluate the Iraqi military and what kind of gaps in it U.S. assistance may address.

But for now, those units will be protected against potential prosecution based on the promise of a beleagured government that is almost certain to change as Iraq's parliament chooses a new prime minister, president and speaker. The risks for U.S. soldiers are potentially high. In January 2011, Pakistani authorities jailed Raymond Davis, a CIA contractor and former U.S. soldier, after he killed two individuals in Lahore. Davis ultimately escaped Pakistani justice. At the time, the Obama administration argued that Davis was covered under the same legal protections as U.S. diplomats.

In Iraq, no such diplomatic immunity is on offer for the special operations teams, according to U.S. officials briefed on the negotiations. These sources say the special operations forces being sent to Iraq would not be covered under the diplomatic immunity provided to U.S. military personnel still attached to the U.S. embassy in Baghdad.

Back in 2011, when the United States tried to negotiate for several thousand U.S. military personnel to stay in Iraq past the end of that year, the White House demanded Iraq’s parliament approve modifications to what is known as a status of forces agreement (SOFA) that included these kinds of legal protections. This month, Colin Kahl, the senior Pentagon official in charge of Iraq policy at the time, explained why the White House insisted on Iraq’s parliament approving the changes to the SOFA.

He wrote in Politico Magazine that in 2011 Iraq’s prime minister, Nouri al-Maliki, “told U.S. negotiators that he was willing to sign an executive memorandum of understanding that included these legal protections.”

But Kahl added, “For any agreement to be binding under the Iraqi constitution, it had to be approved by the Iraqi parliament. This was the judgment of every senior administration lawyer and Maliki’s own legal adviser, and no senior U.S. military commander made the case that we should leave forces behind without these protections.”

Since that time, Iraq’s courts have become even more politicized than they were before. As U.S. forces were preparing to leave the country in 2011, a court convicted Iraq’s highest-ranking Sunni politician, the vice president, Tariq al-Hashemi, of orchestrating terrorism against his own government. Maliki eventually issued an arrest warrant for Hashemi, forcing him into exile. In 2012, an Iraqi court dropped all charges against Ali Musa Daqduq, a Hezbollah military planner that U.S. forces accused of orchestrating a string of five murders of U.S. servicemen in 2007 outside of Karbala. In 2013, Human Rights Watch accused Iraq’s judicial system of systematically relying on coerced confessions for convictions in major terrorism cases.

Yet this time around, Obama is willing to accept an agreement from Iraq’s foreign ministry on U.S. forces in Iraq without a vote of Iraq’s parliament. “We believe we need a separate set of assurances from the Iraqis,” one senior U.S. defense official told The Daily Beast on Sunday. This official said this would likely be an agreement or exchange of diplomatic notes from the Iraq’s foreign ministry. “We basically need a piece of paper from them,” another U.S. official involved in the negotiations told The Daily Beast. The official didn’t explain why the parliamentary vote, so crucial three years ago, was no longer needed.

Of course, part of the problem in 2014 is that the United States doesn’t have the time to wait for Iraq’s parliament. To start, the Iraqi parliament is in the process of forming a new government. The parliament would have to choose a new prime minister, parliamentary speaker and president before reopening the politically sensitive issue of approving legal protections for the military that occupied the country between 2003 and 2011.

Meanwhile, there are other forces that are also stepping in to fill the void. Last week, Iraq’s leading Shi’ite religious authority, Ayatollah Ali Sistani, called on Iraqis to pick up arms and fight the Sunni insurgency led by ISIS. The last time Sunni extremists threatened Iraq, in 2006 and 2007, Sistani used his voice to urge calm.

Iraq’s powerful neighbor, Iran, has also offered its full support to Maliki to fight ISIS with no political conditions on the embattled prime minister. President Obama, on the other hand, has hinted that the Iraqi government would need to include a wider coalition of political parties in order to receive more aid.

The desperation of Iraq’s government has led some in Obama’s government—especially in the State Department—to push for a stronger military response. “By not taking more aggressive action we’re giving the ground to ISIS—anything less than very aggressive at this point is a drop in the bucket,” one administration official sympathetic to the State Department’s argument said. “We have a government in Baghdad that wants our help. It’s the best of bad options.”

Kerry last week also made the case for limited air strikes. “They [drones] are not the whole answer, but they may well be one of the options that are important to be able to stem the tide and stop the movement of people who are moving around in open convoys and trucks and terrorizing people,” he said. “When you have people murdering, assassinating in these mass massacres, you have to stop that and you do what you need to do if you need to try to stop it from the air or otherwise.”

On Monday when Kerry arrived in Iraq for talks with Iraq's leaders, he urged them to form a new government that is inclusive of the country's Sunni minority population.