Last Tuesday, during a call with Egyptian President Abdel Fatah al-Sisi, President Obama outlined a mixed, but nonetheless significant shift in U.S. policy towards Egypt.

On the one hand, Obama released the weapons systems—12 F-16 jets, 20 Harpoon missiles, and as many as 125 Abrams “tank kits”—that had been withheld from Egypt since October 2013. But on the other hand, Obama ended the policy of cash-flow financing, which enabled Egypt to use future aid to buy weapons on credit–a benefit that only Israel now enjoys.

To properly understand the Obama administration’s new policy, it is worth emphasizing one simple fact: administration officials had been urging the president to make a decision on the future of military aid to Egypt since November. Indeed, despite the fact that Egypt is a longtime U.S. ally and is fighting jihadis to its west in Libya and to the east in Sinai, it still took President Obama over four months to decide whether he would send the weapons to Cairo.

(Recommended: The 5 Worst US Presidents of All Time)

The president’s indecisiveness reflects his administration’s profound and often paralyzing ambivalence on Egypt. Simply put, the administration cannot decide whether Egypt is a strategic partner that should be generously supported, or a brutal autocracy that should be denied aid until it pursues a more democratic path. And so from October 2013 through March 2015—seventeen whole months—the administration effectively treated Egypt as both.

Thus, to protest the deadly crackdown that followed the July 2013 toppling of Egypt’s first elected president, the Obama administration withheld “certain large-scale military systems and cash assistance to the [Egyptian] government pending credible progress toward an inclusive, democratically elected civilian government through free and fair elections.” But at the same time, it continued to provide assistance “to help secure Egypt’s borders, counter terrorism and proliferation, and ensure security in the Sinai.”

(Recommended: The 6 Best US Presidents of All Time)

In practice, this meant that Washington sent (after a prolonged congressional delay) Apache helicopters to assist Egypt’s counterterrorism efforts in the Sinai, but withheld F-16 fighter jets to encourage a more progressive political path. As administration officials saw it, this policy represented the Goldilocksian “just right” balance between safeguarding U.S. strategic interests and promoting American democratic values. And, most importantly, the administration believed that the Egyptian government would interpret this policy exactly as it was intended: that Cairo would appreciate Washington’s commitment to Egyptian security, but also consider U.S. concerns for the country’s long-term political development.

Needless to say, that didn’t happen. The administration’s painted-in-gray policy utterly confused Cairo, which is confronting multiple threats on multiple fronts, and therefore views things in black-and-white terms. The July 2013 ouster of Muslim Brotherhood leader Mohamed Morsi locked the Egyptian government in a violent, life-and-death struggle with the Brotherhood, whose supporters demanded Sisi’s execution, orchestrated a low-profile insurgency against state institutions, and called for “martyrdom” in a January 2015 statement declaring “jihad.” Meanwhile, the Egyptian military began a major offensive against Sinai-based jihadis in September 2013, and launched a series of airstrikes against jihadis in Libya starting in August 2014.

So as bombs exploded in major Egyptian cities, and as hundreds of security forces were killed in Sinai and the Western Desert, and as the broader region continued its descent into unprecedented chaos, Cairo had one question for Washington: are you with us or against us? The Egyptian government, in other words, didn’t view the Obama administration’s withholding of F-16 fighter jets as an affirmation of Washington’s commitment to democracy. Rather, Cairo saw the move as a significant blow to its long-term security at perhaps the most dangerous moment in contemporary Middle Eastern history.

Therefore, with the generous help of its Persian Gulf allies, Egypt sought to satisfy its defense needs elsewhere. It signed a $5.5 billion deal to buy 24 Rafale fighter jets from France, and is negotiating a $3.5 billion arms deal with Russia.

As a result, Washington’s influence with Cairo waned. Egypt blew off the administration’s criticism of its strikes against jihadis in Libya, rejected Washington’s offer of counterterrorism training, and will likely purchase S-300 surface-to-air missiles from Russia—a weapons system that would undercut Israel’s qualitative military edge, which the U.S. is legally committed to maintaining.

Meanwhile, Egypt remained thoroughly autocratic, as the kill-or-be-killed dynamic that defined Egypt’s post-Morsi politics made inclusive politics highly improbable, if not impossible.

Yet, even as it became clear that the administration’s policy towards Cairo was damaging U.S.-Egyptian relations without in any way promoting democracy, Obama could not move beyond his exasperation with Egypt’s repressive domestic politics. So even as the State Department and Pentagon urged the administration to move on, Washington’s Egypt policy was stuck in purgatory for months on end.

Ironically, President Obama may have thought his phone call to Cairo announcing the release of weapons would turn a new page in a rocky relationship. But by coupling that decision with the cancellation of a financing scheme that was a signal of Egypt’s special relationship with Washington, Obama might have closed the book on any chance for closer U.S.-Egypt ties until a new president takes another look at this old alliance.

Eric Trager is the Esther K. Wagner Fellow at the Washington Institute for Near East Policy.

Image: The Official White House Photostream