More than three weeks after the election, the American public remains divided over Donald Trump’s surprise victory. Six thousand miles away, however, one U.S. ally has demonstrated a far more unified response.

Egyptians, particularly those of a pro-government bent, are among the world’s happiest people about the Trump win. That may seem odd for a Muslim-majority country, given that Trump has floated the idea of a ban on Muslim immigration to the United States and even a registry for Muslims already in the country. To understand Trump’s appeal to Egyptians, therefore, it’s critical to look at the candidate he defeated.

Hillary Clinton is hugely unpopular in Egypt—a function primarily of her having served as secretary of state under U.S. President Barack Obama during the 2011 Egyptian revolution, which toppled longtime leader Hosni Mubarak. Ten days into the revolution, Obama demanded that his Egyptian counterpart, a three-decade U.S. ally, heed protesters’ demands and immediately step down. For those Egyptians who were positively inclined toward the military-led regime—and even for much of the apolitical middle,  which is concerned above all with stability—the move was a betrayal. It paved the way for the Muslim Brotherhood’s election a year later and its subsequent, bloody removal by the military in July 2013. Clinton’s close relationship with her aide Huma Abedin—whose family some critics allege is sympathetic to the Brotherhood—didn’t help her favorability ratings in Egypt.

Clinton’s actual record on Egypt is rather different from what her reputation has suggested. As she lays out in her memoir Hard Choices (an account no former administration official has contested), she warned Obama about the optics of abandoning a decades-long ally. Moreover, she told him, the country had only two institutions—the Brotherhood and the army—with large enough support bases to lead. Unlike the president, she backed not an “immediate” transition but an “orderly” one—a phrase perhaps less suited for sound bites, but, in hindsight, one that reflected smarter policy.

Of course, in a conspiracy-happy country such as Egypt, these facts matter little, and Trump’s main appeal is that he isn’t Clinton. But that’s not all. A look at Trump’s Twitter account reveals another reason why the president-elect has so many fans in Cairo.

Since 2011, Trump has tweeted at least ten times to criticize Obama’s abandonment of Mubarak, and in more than two dozen instances he bemoaned his predecessor’s alleged coziness with the Brotherhood. Since the election of the former army chief Abdel Fattah al-Sisi in spring 2014, by contrast, Trump has tweeted about Egypt just once: to chastise the U.S. administration for harping about human rights abuses while Cairo was battling jihadists in Sinai allied with the Islamic State (or ISIS). “Do you believe that Secy. KERRY just went to Egypt to talk about ‘human rights problems,’” he wrote, “and this as everything is being blown up around him.”

It’s all music to Cairo’s ears. A Trump administration will likely come with none of the human-rights denunciations that its predecessor did, and the prospect of its suspending aid to protest such abuses—as that same predecessor did—has all but evaporated.

When more than 140 foreign leaders streamed into New York in September for the UN General Assembly, Trump made time for one head of state alone: Sisi. (Clinton met with him as well, but tempered her remarks with criticisms of Egypt’s human rights record and met with two other leaders too.) Afterward, Trump hailed Sisi as a “fantastic guy” who “took control of Egypt and “took the terrorists out—he wiped them out.” (ISIS fighters in Sinai, still waging regular attacks, might beg to differ.)

For his part, Sisi had a day earlier assured CNN’s Erin Burnett that Trump’s proposed Muslim ban was mere rhetoric, and that he had “no doubt” that the businessman would make a formidable president. When news broke of Trump’s win, Sisi was the first foreign leader to extend his congratulations, ahead of his counterparts from stalwart U.S. allies such as the United Kingdom and Germany. Last week, the Egyptian president doubled down, gushing about Trump’s “deep and great understanding of what is taking place in the region as a whole and Egypt in particular,” and the “reinforcement of our bilateral relations” he expected from the incoming administration—an implicit slight against Obama.

Visiting Egypt just before the U.S. elections, I encountered similar sympathy for the Republican candidate—and not just from officials and government supporters.

Egyptians of various stripes questioned the wisdom of the Obama administration’s intervention in neighboring Libya—one for which Clinton reportedly pushed hard and which Trump (again on Twitter) has railed against. Millions of Egyptians had earned a livelihood in prewar Libya, and many now prefer the comparatively stable, if despotic, rule of Muammar al-Qaddafi to the country’s current conflagration between ISIS, government forces, and sundry militias.

On Syria, Clinton had advocated greater support for the rebels—the same rebels whose reliability Trump has consistently cast doubt on, insisting he would focus on targeting ISIS instead. Similarly, Trump’s declarations notwithstanding, Egypt is still battling its own ISIS insurgency, and has made it all but clear that, when it comes to Syria, it prioritizes the fight against the terrorist group over any attempt to dislodge the regime.

For Cairo, Clinton would have brought a continuation—or even exacerbation—of Obama-era bad blood. But Trump’s apparent positions, when taken together, made him a near-ideal candidate. U.S. policymakers seeking smoother diplomatic, security, and strategic ties with Egypt can thus take heart. Those hoping the White House will continue to pressure its ally on civil rights and the rule of law may well be in for disappointment.

By Oren Kessler