Back in 2009, when I was hosting a TV discussion show in Cairo, I was shocked at how brazenly the security services would interfere in our work, attempting to enforce a pro-government, pro-military editorial line through threats and ominous phone calls to my producers. Censorship kept some of our shows off air, and our government minders manipulated the editing process. After the first season, we were forced to shut down.

Behind Egypt’s authoritarian curtain, however, the Cairo intelligentsia was abuzz about President Barack Obama’s historic speech at Cairo University in June of that year. It was not only Obama’s words that interested Egyptians, it was his example: A man who shared their skin tone and whose father was raised Muslim had been elected president of the most powerful country in the world, while they were still denied basic rights in their own country. As Hosni Mubarak, who presided over a tiny oligarchic elite utterly disconnected from average Egyptians, prepared to hand over power to his son, Gamal, a dramatic democratic uprising was building.

Five years later, the American president who once promised an Egyptian audience that he would actively defend their right to have “the ability to speak your mind and have a say in how you are governed” has thrown his support behind a regime that is far more tyrannical than Mubarak’s. Under the iron fist of Egyptian President Abdul-Fattah el-Sisi, the military “deep state” that controls a full third of Egypt’s economy and dominates the halls of power is expanding its influence while the country’s oligarchs amass record wealth. The only democratically elected leader in Egypt’s 5,000-year history, Mohamed Morsi, was recently sentenced to death in a kangaroo court, while 40,000 political prisoners languish behind bars, facing torture and sexual abuse. All political alternatives to the current regime have been crushed through force and intimidation, while opposition leaders reside in exile. Egypt today is ruled by the same military-based regime in alliance with the same business interests as during the Mubarak era, except with less restraint than the late dictator showed when it comes to brutalizing nonviolent opponents.

At every stage of Sisi’s bid to reassert military rule, Washington has provided the necessary diplomatic and material support, ensuring Cairo’s regression to the capital of Arab repression. Just days before Egyptian security forces massacred 1,000 nonviolent protesters in the Cairo suburb of Rabaa in August 2013, Secretary of State John Kerry announced that Sisi was “restoring democracy.” In October 2014, at a conference in Cairo dedicated to raising funds to rebuild the areas of the Gaza Strip decimated by Israeli attacks that summer (a process that has yet to begin), Kerry lent Sisi further legitimacy, hailing the dictator for “the pivotal role that Egypt has played in this region for so long.” As Sisi’s courts intensified the regime’s repressive rule, overseeing the aforementioned jailing of 40,000 Egyptians and hundreds of arbitrary death sentences, Bill and Hillary Clinton met Sisi for a photo-op. And just this April, when Obama lifted an executive order barring weapons sales to Egypt, White House National Security Council spokesperson Bernadette Meehan noted, “The Administration will not make the so-called ‘democracy certification’ in that legislation.”

Sisi has secured Washington’s support by posing as a guarantor of stability, both in his own country, where his armed forces do battle with Islamist militias in the Sinai Peninsula, and in Libya and Yemen, where he has authorized military operations. Yet his iron-fisted rule has produced nothing but chaos. In the first three months of 2015 alone, Egypt recorded 1,641 incidents of political violence—one every 90 minutes. Now even Sisi’s generals are sweating bullets. As David Hearst reported in a column for the Middle East Eye last month, one top military figure was heard grumbling, “It has never been as bad as this in Egypt.”

So far, 500 people have been sentenced to death, all charged with killing the same police officer. Meanwhile, an estimated 6,000 unarmed protesters have been slaughtered by Egyptian law enforcement, and so far there has been no investigation into this police brutality. Compounding the problem, Egypt’s oppressive policies represent a dream scenario for Al Qaeda and extremist elements like it. A disturbing number of activists, both Islamist and secular, who joined the peaceful rebellion of 2011 have joined extremist groups since the door to democratic participation was slammed in their faces. Chief among them was Ahmed al-Darawy, a pro-democracy activist who ran for parliament and wound up joining ISIS after the 2013 coup in Egypt.

It is worth remembering how Al Qaeda’s top figure, Egyptian Ayman al-Zawahiri, warned young Muslims against democracy. In his book The Bitter Harvest, he urged them to change their reality through violent jihad, not through the ballot box, emphasizing that military rulers would never allow them to exercise their rights. He excoriated the Muslim Brotherhood as naive for its participation in elections and its democratic ambitions. According to Zawahiri, it was preferable to seize power through violence, because “the crusaders” and their allies in the Arab world would never allow the emergence of a true Islamist state. In many ways, Sisi is the fulfillment of Zawahiri’s prophecy.

Many young people across the Middle East see the unfolding of events as vindicating the nihilists’ claims that democracy is a dangerous illusion. The narratives of Sisi and ISIS are, ironically, codependent. Sisi, like Bashar al-Assad in Syria, justifies his repression as necessary to save Egypt from a vast “terrorist threat”; that repression forces opponents back onto the path of violence, which in turn feeds Sisi’s claims. While the Muslim Brotherhood’s leaders have stayed firm to the organization’s rejection of violence that began decades ago, they can no longer control younger activists and supporters who were left without a nonviolent alternative.

Sisi is following the sectarian playbook of both Assad and Nouri Al-Maliki, whose repression of opponents in Syria and Iraq paved the way for ISIS. Like Assad, Maliki, and despots throughout the region, he presents Egyptians with a simple choice: You are either with me or against me, and if you are against me, you will be labeled a “jihadist,” whether you are or not. Sisi has predicated his survival on wiping out political gray zones and smashing the center.

The Obama administration continues to delude itself, thinking that American national security can be secured through alliances with dictators whose torture and prison cells gave rise to Sayyid Qutb, the founding father of modern jihadism, as well as Ayman al-Zawahiri, the brain behind Al Qaeda. (Both Qutb and Zawahiri were famously and brutally tortured, Qutb under Gamel Abdel Nasser, who executed him in 1966; Zawahiri under Mubarak.) It is similarly dangerous to think that acceding to the pressure of Sisi’s backers among the Gulf monarchies—chief among them Saudi Arabia, whose official religion, Wahhabism, seeded the theological roots of Al Qaeda and ISIS’s ideology—will bring stability to the region. Obama’s reversal of his promise to support democracy in Egypt has almost guaranteed that Sisi’s prisons will someday produce a figure who makes the fanatical Zawahiri seem like Cat Stevens.

Any practical national security strategy would require that the United States be just as tough on Middle Eastern dictators as it is on terrorists. Washington should freeze its aid to Egypt immediately, tying its resumption to concrete democratic reforms, including welcoming the Muslim Brotherhood back into a democratic, inclusive political process. We should engage immediately with the office of the Grand Mufti of Egypt to compel him not to sign the death sentence of Morsi pending next week. This will prevent Morsi from becoming an icon and a martyr—another Qutb. Such a step will send a message that the Washington does not condone human-rights violations, even when the perpetrators are allies. Until we commit to democracy and dignity in the Middle East, we are playing into Al Qaeda’s hands.