When Saudi Crown Prince Mohammed bin Salman (MBS) arrived in Tunis on November 27, Tunisian President Beji Caid Essebsi warmly welcomed him with a grand ceremony at the presidential palace. Essebsi even awarded the Saudi prince Tunisia’s highest official honor, the Grand Cordon of the Republic. In turn, MBS gave a brief statement to select media outlets, emphasizing that Riyadh and Tunis have long had “positive relations” and that Essebsi is like a “father.” Tunisia was one of several friendly countries MBS visited on a two-week “comeback tour,” his first trip abroad since the death of Saudi columnist Jamal Khashoggi on October 2. Accused of ordering the journalist’s murder, MBS offered the countries he visited financial incentives, in what observers judged an effort to look past his alleged criminal involvement.

At face value, Essebsi’s present embrace of MBS could indicate positive relations between Riyadh and Tunis, an observation further validated by Tunisian Prime Minister Youssef Chahed’s subsequent trip to Riyadh on December 13 at the crown prince’s invitation. Indeed, from the Saudi perspective, its interests in Tunisia—namely, curbing the influence of political Islam—have remained consistent for decades. But in recent years, Tunisian leaders’ alignments with regional blocs supporting or opposing the rise of political Islam, including the Muslim Brotherhood and similar movements, have influenced this relationship.

Even before the increased concern over the rise of political Islam, Tunisia’s political moods have long swayed the country’s diplomatic exchange with Riyadh. Formal relations between Riyadh and Tunis resumed in 2003 following a lengthy rift after former president Zine Al Abidine Ben Ali supported Iraqi president Saddam Hussein during the First Gulf War, a diplomatic rebuke of Saudi Arabia’s agenda. More ups and downs followed this rapprochement. After the overthrow of Ben Ali in 2011, two regional camps—a Qatari–Turkish and a Saudi–Emirati one, each with differing geopolitical interests and ideological visions—sought to influence Tunisian politics. The two blocs’ competition for influence stretched across the region in a rivalry that escalated into the ongoing blockade of Qatar since June 2017. Qatar and Turkey backed Ennahda, the country’s main Islamist party, which was originally influenced by the Muslim Brotherhood; its ascent during Tunisia’s transition continues to worry Saudi Arabia and the UAE. Tunisia’s foreign and domestic policies have mirrored this rift for the past seven years, swinging in favor of one rival bloc or the other, depending on which party is more firmly in power.

The dynamic between Essebsi’s Nidaa Tounes party and Ennahda has both shaken and steered Riyadh–Tunis relations in recent years. In 2014, Nidaa Tounes, which ran on an anti-Islamist platform that garnered the support of the Saudis and Emiratis, formed a pragmatic coalition government with Ennahda, straining relations with the kingdom and the UAE. In a bizarre episode that spiraled into a diplomatic crisis between December 2017 and January 2018, state-run Emirates Airlines banned young Tunisian female travelers on their flights, which many analysts read as a sign of Abu Dhabi’s discontent.

Tunisia’s recent rapprochement with Saudi Arabia, including its warm reception of MBS, should be understood in light of the recent “divorce” between Nidaa Tounes and Ennahda in September, as well as the deepening crisis within Nidaa Tounes itself. As Essebsi finds himself on shakier political ground with each passing day, the support of a regional ally has likely grown more appealing. After Chahed’s recent three-day visit to Riyadh, he told reporters that the kingdom has pledged around $830 million—including about $500 million to balance the budget and $120 million for agricultural projects—inflating earlier figures circulated after MBS completed his visit to Tunis. Chahed’s visit came as a surprise to many Tunisia observers: the premier is in an ongoing spat with his former party, Essebsi’s Nidaa Tounes, and now has the backing of Ennahda. For the kingdom to invite Essebsi’s newfound rival after the president’s show of support for MBS raised questions about the future of Saudi Arabia’s engagement with Tunis—and which domestic party its support best aligns with.

Two other important factors play into Tunisian–Saudi relations: the country’s defense policy and its financial challenges. In 2013 and 2014, the Ennahda-led government signed security agreements with Turkey and Qatar. Essebsi, who controls defense and foreign policy, has advanced stronger relations with Riyadh since becoming president in 2014.1 In 2016, Tunisia ramped up military cooperation with Saudi Arabia. In early October—just days after Khashoggi’s murder—Tunisia carried out its first-ever military aerial exercises with Saudi Arabia’s Air Force. Essebsi’s stance even shaped Tunisia’s official response to the killing of the Saudi journalist. Although Foreign Minister Khemaies Jhinaoui called Khashoggi’s murder a “heinous crime” and urged for an investigation to reveal the “truth,” he also noted Tunis’s commitment to Riyadh and warned against the “exploitation” of the affair to destabilize the kingdom.

Furthermore, Tunisia’s financial state is increasingly becoming a driving factor in its foreign policy. Tunisia needs Saudi investment, as high unemployment, routine strikes, and political stalemates have stifled economic growth, further hindered by a series of terrorist attacks that flogged the country’s tourism sector. In 2016, Saudi Arabia pledged $850 million in aid during the Tunisia 2020 conference, and the two countries signed eight additional agreements in 2017, though it is unclear how much of this money has been disbursed. In the wake of MBS’s most recent visit, several unconfirmed reports emerged that he agreed to lend Tunisia $500 million in loans with preferential interest rates.

However, on balance, Saudi Arabia has not obtained the political backing it sought for key foreign policies. Tunis remained neutral on the Qatar dispute, with members of the national unity government calling for dialogue between all parties to overcome the crisis. After all, Qatar has also been a major donor, pledging support of up to $1.25 billion during the Tunisia 2020 conference in November 2016—significantly more than the Saudi pledge. Similarly, when Saudi Arabia launched a GCC intervention in Yemen in March 2015, Tunisia’s foreign ministry initially called for an “Arab solution” through dialogue, but tempered its criticism saying it “understood” Saudi’s motives for the intervention. Since then, Tunis has expressed the same mildly supportive stance.

Saudi support to Tunis remains insignificant in comparison to, for example, the amount provided by the European Union and its member states. And Saudi Arabia has always given more money, for instance, to Egypt, which it considers a far more strategic and regionally potent ally. However, Tunisia’s frail economy could push it closer to Riyadh than ever before. A key indicator of the evolution of the Saudi approach—and Tunisia’s reception—will be any subsequent development in their defense cooperation. Another determining factor will be the 2019 presidential and parliamentary elections: with Tunisia’s current leading party—and Saudi Arabia’s biggest ally in the country—in shambles, elections could usher in a new ruling coalition. This would likely prompt yet another pivot in Tunisia’s stance toward the kingdom.

Asma Ajroudi is an independent journalist and researcher focusing on North Africa and the Levant. Follow her on Twitter @Aj_asma.

1. Email interview with Sharan Grewal, a post-doctoral fellow at the Brookings Institution.