In November 2017, Saudi Crown Prince Mohammad bin Salman (MbS) launched an impulsive bid to isolate Iran by forcing the resignation of Lebanese Prime Minister Saad Hariri during a visit by the latter to Riyadh. The Crown Prince was counting on the support of his Sunni Arab allies, but one notable Arab country abstained. Instead of backing its key regional benefactor, Egypt immediately aligned itself with French efforts to broker a diplomatic solution, hosting Hariri in Cairo and championing his return to Lebanon as prime minister. Egypt’s stance, focused on “the importance of preserving Lebanon’s stability and elevating Lebanon’s national interests,” struck a discordant note with Riyadh’s recent “with us or against us” attempts to reorder the Middle East along Manichean lines between itself and Tehran.

Hariri was not the only high-profile visitor to Cairo to raise concerns among Egypt’s longtime patrons: on December 11, Russian President Vladimir Putin visited the country to highlight deepening ties between Egypt and Russia, including a potential agreement that would reportedly allow Russian warplanes to use Egyptian military bases—this despite Egypt’s four-decade, $50 billion defense partnership with Washington.

Such independence may frustrate Cairo’s foreign benefactors, but it should not come as a surprise. Egypt’s willingness to go its own way has been a consistent feature of the country’s foreign policy since at least July 2013, when a popularly-backed military coup ousted President Mohammed Morsi of the Muslim Brotherhood. Under the new presidency of Abdel Fattah el-Sisi, Cairo has gradually been formulating a new foreign policy doctrine based on ideological commitments to anti-Islamism, respect for traditional and often retrograde notions of sovereignty and non-interference, and a defiantly nationalistic reassertion of Egypt’s freedom of maneuver within the region. Taken together, they are leading Egypt away from its traditional allies and toward a more independent—and uncertain—future.

A NEW WORLDVIEW

The roots of Egypt’s new foreign policy lie in the 2011 uprising that led to the removal of President Hosni Mubarak. Under the midcentury leadership of President Gamel Abdel Nasser, Egypt had been the political and cultural leader of the Arab world and a prominent force on the world stage. But, during his nearly 30 years in power, Mubarak transformed the country into a reliable and largely predictable U.S. client and close ally to U.S. partners such as Saudi Arabia, albeit one lacking dynamism and regional influence.

The roots of Egypt’s new foreign policy lie in the 2011 uprising that led to the removal of President Hosni Mubarak.

Mubarak’s departure, however, put this stance into question. Although foreign-policy concerns were secondary to the domestic issues that animated the uprising, the protestors’ demands included an inchoate notion of restoring national dignity that extended to the realm of foreign policy and survived throughout Egypt’s tumultuous transition.

Throughout the early post-Mubarak period, Egyptian elites and members of the public debated how to restore their country’s independence of action and diversify its relationships abroad. Morsi’s yearlong presidency, for example, featured visits to Beijing and Moscow. This post-coup foreign policy orientation was partly an outgrowth of urgent economic, political, and security needs at home, above all the country’s fight against Islamists and its budgetary shortfalls. But, over the last few years, as Egypt’s economic and political life has partly stabilized under Sisi, these initially scattered tendencies have increasingly evolved into a coherent worldview.

The first and most important element of this worldview is anti-Islamism. Zealous, rigid opposition to the Muslim Brotherhood and its offshoots has been the ordering principle of the Sisi regime and is now the most dominant feature of Egyptian political life. Although the Sisi regime has targeted all forms of political expression and dissent, it has been particularly focused on the Brotherhood. In its efforts to eradicate the organization, the government has resorted to broad-based repression, outlawing the Brotherhood, jailing tens of thousands of its members and sympathizers, and engaging in outright violence to quash the possibility of future mobilization.

Egypt’s anti-Brotherhood campaign doesn’t stop at the border—Cairo views the group as a transnational threat, and it has sought to pressure and weaken groups it perceives as Brotherhood affiliates in Libya and the Gaza Strip. (Egypt’s recent moves to improve ties with Hamas, a Palestinian offshoot of the Brotherhood, are a rare pragmatic exception to its usually unremitting hostility to political Islam.) Egypt has also been adamant in its opposition to the use of Islamist militant proxies as a tool in any of the region’s conflicts—an official warned one of the authors in an interview of the dangerous “quagmire” such an approach would yield in Syria. This anti-Islamism led Egypt to quietly align itself with the government of President Bashar al-Assad and its Russian backers—who share Egypt’s dim view of Sunni Islamism and faith in stability through sovereign repression—rather than Saudi-led efforts to cultivate rebel forces and topple Assad.

The second, related commitment of Sisi’s Egypt is an attachment to stability derived from state sovereignty. As its neighbors intervene to remake the region along sectarian or Islamist lines, Egypt has in this respect emerged as perhaps the most prominent status quo player in the Middle East. Early glimpses of this approach could be seen in Egypt’s dealings with Iraq during the rise of the Islamic State, when Sisi publicly supported Iraq’s Shiite prime minister, Nouri al-Maliki. Egypt’s stance has been all the more notable given Saudi Arabia’s emergence as an unpredictable revisionist power, as seen in Lebanon, Syria, and Yemen. The kingdom’s foreign policy revisionism has mostly been in the service of its rivalry with Iran, yet Egypt has refused to follow Saudi Arabia’s hard line, eschewing anything more than pro-forma anti-Iranian sentiments and resisting the sectarian polarization that has destabilized the region in recent years. Egypt has neither resolved its longstanding tensions with Iran nor restored full diplomatic relations. It has simply refused to be drawn into regional conflict.

Egyptian troops outside the al-Rawdah mosque in al-Abed, December 2017. Mohamed Abd El Ghany / Reuters

In the hierarchy of its foreign policy interests, however, Egypt’s attachment to state sovereignty remains secondary to its anti-Islamist agenda. When these principles are in direct conflict, anti-Islamism still trumps all other considerations. This is evident both in the ongoing crisis with Qatar (whose sovereign rulers now face an Egyptian-backed, Saudi-led embargo largely due to past support for Islamists) and in the chaos of Libya’s multi-sided conflict (where Egypt’s chosen partner in securing its porous western flank, General Hafter, is waging his own existential war against Islamists and once declared that “Libya needs a Sisi”).

EGYPT’S RIGHTFUL ROLE

The third and final commitment behind Egypt’s newfound assertiveness and independence is a resurgent nationalism that seeks to restore the country to what its history and vanity suggest is its rightful role in the region. Although this has tipped into jingoism at times, as seen in the anti-American conspiracy theories and suspicion of foreigners that dominate the Egyptian press, it has accentuated Egypt’s desire to make itself relevant to regional affairs. It has also produced an abrasive suspicion, opportunistically stoked by some Egyptian officials, that outside powers seek not just to sway Egypt but to dominate or destabilize it. This has offended each of Egypt’s most generous benefactors, leading to serious diplomatic tensions not merely with the United States, but with Italy, Russia, Saudi Arabia, and the United Arab Emirates as well.

In the years after 2011, Egyptian leaders, including Sisi, have spoken frankly about the need to focus on addressing internal challenges, but such sentiments have often been displaced by Egypt’s enduring, inflated sense of its own role—including the mistaken but widespread conviction that no major regional conflict can be solved without Cairo. This view, prevalent among the Egyptian people and the governing elite (though Sisi has been more realistic), is a function of its size, past centrality, and cultural predominance within the Arab world. Such sentiments, however, have only a limited connection to Egypt’s actual power and influence. Since the country’s heyday a half-century ago, when it was the undisputed leader of the Arab world, the Middle East’s power and wealth have migrated eastward to more dynamic economies such as Israel and Turkey and the petro-states of Saudi Arabia, the Gulf monarchies, and Iran. These countries (albeit to varying degrees) are able to use their wealth, military power, and regional proxy networks to project power in ways that Egypt simply cannot. Geography means that Egypt has continued to play an important role in Libya and Gaza, but elsewhere Cairo has sought to turn its relative weakness into diplomatic currency—for instance by attaching itself to diplomatic initiatives and seeking a position as a broker between rival regional factions, as it did during the Lebanon crisis.

Since Egypt's heyday a half-century ago, the Middle East’s power and wealth have migrated eastward.

Egypt is unlikely to anchor a fourth major regional bloc alongside the Saudi-led revanchists, the Iranian hegemonists, and the Turkish-Qatari pro-Islamists, but a regional constituency may well exist for one. Egypt’s voice in the Middle East’s conflicts has so far been muted, and the country has been more of a battleground for regional supremacy than a contender in its own right. Yet Egypt’s domestic politics remain a bellwether for others—as when the rise and fall of Egypt’s Islamists set the tenor for the region as a whole—and Cairo’s refusal to adopt Saudi Arabia’s maximalist line has both benefited Egyptians and pointed the way toward a less sectarian regional politics.

In particular, Egypt today is an example of the limits that MbS could encounter if, as the preeminent Sunni Arab leader, he attempts to dictate others’ political choices. These limits were on full display in spring 2015, when Egypt refused MbS’s surprise call to join a Sunni Arab military coalition to fight the Houthis in Yemen. As a senior Egyptian official remarked to one of the authors, “We’re Egypt—you cannot call us at three o’clock in the morning and expect us to go to war in the morning.” Egypt belatedly made limited contributions to the Arab military coalition but by and large steered clear of what has proven a disastrous and costly fight.

WHERE CAIRO GOES FROM HERE

Since 2013, Egypt’s go-it-alone spirit has been tempered by its desperate need for international legitimacy, security aid, and, above all, tens of billions of dollars from wealthy Gulf nations (which have, in Sisi’s memorable phrase, “money like rice”). Yet, while Egypt has been happy to cash foreign checks, it has often rejected foreign advice, whether from Washington or Abu Dhabi. Now, however, a number of conditions could give the country’s leaders the confidence to pursue an even more independent approach.

For one, rather than face continued pressure from the United States over human rights, Sisi has received an uncritical endorsement and Oval Office embrace from U.S. President Donald Trump. Egypt’s IMF-backed structural reforms have also brought a measure of economic stability, despite inflation and joblessness. And both the Saudi-led embargo of Qatar and the violent instability that followed the Arab uprisings have contributed to a region-wide decline of Islamist groups, setting the stage for a mending of previously-strained Egyptian-Saudi ties. Perhaps most importantly, Egypt has assumed that it is simply too big to fail, and so far its allies have acted accordingly. Perhaps because so many of its neighbors are plagued by instability and militancy, Cairo’s unorthodox moves have not led to any diplomatic ruptures. Instead, Egypt’s partners have accommodated themselves and remain loath to challenge Cairo at this delicate juncture.

Ultimately, Egypt’s attempt to return to regional prominence will depend on Sisi’s ability to shore up power at home. To project influence outside its borders, Egypt will need to bring about a more stable and secure economic, political, and security base at home, including significant reforms to open space for a vibrant public square and a private sector rather than putting the burden of Egypt’s national renewal on its government alone.

The more Egypt goes its own way, however, the harder it will be to reconcile the contradiction at the heart of contemporary Egyptian foreign policy: on the one hand, Egypt seeks to maintain its traditional alignment with Riyadh and Washington, receiving money from the former and arms from the latter. On the other hand, Cairo is increasingly refusing to follow Saudi Arabia’s regional line and cozying up to Russia, potentially opening its bases to the United States’s principal geostrategic competitor in the region. If Egypt continues to pursue this two-track policy, Riyadh or Washington may at some point present Egypt with a sharper choice. Until they do, Egypt is certain to test their limits.

CORRECTION (1/4/18): An earlier version of this article referred to Mubarak's "nearly 20 years in power." Mubarak was in power for nearly 30 years. We regret the error.