In the hours after members and supporters of Iranian-backed militias in Iraq began protesting at the U.S. Embassy in Baghdad, senior Trump administration officials in the State Department, White House, and Pentagon convened to discuss options for how to respond. The situation in the country was growing increasingly hostile on the ground, and an American contractor had been killed just days earlier by a rocket attack launched by Kataib Hezbollah.

Key advisers to President Donald Trump presented a slew of options, as they had in the past when Iran’s rockets got too close for comfort or its militias had made moves on the battlefield that suggested they were postured to strike American assets, according to two senior U.S. officials. But the attack on a U.S. base near Kirkuk was different from past skirmishes between American and pro-Iranian forces. An American was dead and Iran showed no sign of backing down militarily in Iraq or elsewhere in the region.

“The president was faced with a choice and he took the shot,” a person familiar with Trump’s thinking told The Daily Beast, referring to the Trump administration’s assassination of Iran’s top military leader, Qassem Soleimani, last week.

Things were never expected to get to this point. Part of the implied goal of an American policy known as “maximum pressure,” with its crushing sanctions on the Iranian economy, was to force Tehran to scale back its aggression. While the Trump administration never specifically stated that the campaign aimed to curtail Iran’s military stance toward the U.S. and its allies, American officials told The Daily Beast that the White House hoped it could gain enough leverage with sanctions to deter Tehran’s military aggression. The attack that killed the contractor, the move toward U.S. bases, these were signs Iran was getting more aggressive, not less.

The president wasn’t alone in his decision to strike Soleimani. Officials across the three agencies had for months discussed Iran’s threat against the U.S. and determined that the maximum pressure campaign had not changed Tehran’s behavior, at least not militarily, according to the two U.S. officials and three other individuals with knowledge of the administration's decision-making regarding Iran. It had only bolstered Iran’s adversarial posture toward American assets in the Middle East and elsewhere throughout the world, those sources said. Behind closed doors, many U.S. officials began to question the efficacy of maximum pressure, while others pushed the president privately to go after a high-profile Iranian target.

“ While the maximum pressure campaign has completely ravaged Iran’s economy, Tehran’s intentions toward the U.S. have remained as hostile as they have been for four decades. ” — Mark Dubowitz, CEO, Foundation for Defense of Democracies

“While the maximum pressure campaign has completely ravaged Iran’s economy, Tehran’s intentions toward the U.S. have remained as hostile as they have been for four decades,” said Mark Dubowitz, the CEO of the Foundation for Defense of Democracies, a think tank in Washington known for advising the Trump administration on its Iran policy. “Up until now I think people assumed that the president would only use sanctions as his sole instrument of national power. But once Soleimani-backed militias killed an American and threatened to kill others, the president decided to do what no president has done in the past. It could now change the way the administration deploys the full range of national power against the regime in Iran.”

Following the assassination of Soleimani, Secretary of State Mike Pompeo went on national television and laid out exactly how Soleimani’s actions had begun to worry the U.S. enough that they deemed it necessary to strike.

“We watched the intelligence flow in that talked about Soleimani’s role in the region and the work that he was doing to put Americans further at risk,” he said. “It was time to take this action… so we could disrupt this plot. The risk of doing nothing was enormous.”

But months earlier, Pompeo was making nearly the opposite case: that maximum pressure was causing Iran to turn down the heat.

“ Before we reimposed sanctions and accelerated our pressure campaign, Iran was increasing its malign activity,” Pompeo wrote in an opinion column last spring. “U.S. pressure is reversing these trends. The regime and its proxies are weaker than when our pressure began. Iranian-backed militias have stated that Iran no longer has enough money to pay them as much as in the past and has enacted austerity plans.”

The State Department, Pentagon, and White House did not respond to a request for comment.

Maximum pressure was drafted, in part, with the help of outside economic and political consultants and former officials who publicly called on the U.S. to take a much harsher stance against the Iranian regime. Since then, the Trump administration has sanctioned more than 1,000 Iranian entities. Most recently, it designated Tehran’s main military outfit as a terrorist organization.

All of that was designed to cripple Iran’s ability to grow on the international stage through trade and to make it more difficult for the regime to prop up its most important institutions. And it’s largely worked. Iran is struggling to pay its bills, and its ability to sell its key good—oil—on the international market has been severely diminished. And in that sense, the U.S. has succeeded in its goal. But the other part of the maximum pressure campaign was supposed to change Iran’s behavior—the way it acted on the international stage.

For some time throughout the last six months it seemed as though the U.S. and Iran were working toward coming back to the negotiating table on issues like the nuclear deal. America’s intermediaries in places like Switzerland, Oman, Iraq, and France passed messages between the two countries in the hopes that the two could begin some sort of process toward reconciliation.

Others in the U.S. government, though, had their doubts, concerns heightened by the purported Iran strike on Saudi oil facilities and Tehran shooting down an American drone over the Gulf of Oman.

But for Trump, who has said publicly that he did not want to go to war with Iran, the maximum pressure campaign was the best of both worlds—it hit Tehran economically but would keep the U.S. out of a protracted military conflict with the country. And for years, the Trump administration’s line was consistent: Our policy toward Iran is working; Iran is weakening.

The problem, according to Jennifer Carafella, the research director at the Institute for the Study of War, was that “there is no consensus on what threshold of Iranian escalation is noteworthy or unacceptable.” That incoherence, she added, made maximum pressure “more likely to lead to war than to lead to Iran surrendering on the administration’s terms.”

In recent months, it became clear to those at the State Department and within the broader national security community that Iran had grown more emboldened on the battlefield and that the maximum pressure campaign had not deterred Tehran militarily. Iranian-backed militias were launching rockets closer to American infrastructure in Iraq and further bolstering their support for rebels in Yemen.

Virtually no one expects Iran to suddenly buckle with Soleimani’s death. If anything, the expectation is that Tehran will retaliate—and that America will respond with additional force, both economic and military. In that way, some version of maximum pressure may even grow more intense.

“I’m not sure anyone really knew what the endgame was supposed to be. The purpose of sanctions and coercive authority is to cause a change in behavior or policy outcomes with respect to the folks in Tehran. If it’s not regime change, it’s not entirely clear how this works,” said one former Obama official who worked on Iran policy. “The reality is that it’s working, tactically, from an economic perspective. But the maximum pressure campaign clearly hasn’t demonstrated enough strength to determine Iran’s activity in the neighborhood.”

—with additional reporting by Spencer Ackerman