A soldier keeps watch in downtown Tunis. (Reuters)

Five years after the Arab Spring, only Tunisia remains on the path to democracy. To explain the Tunisian success story, scholars often point to the Tunisian military, which, unlike other militaries in the region, supported its country’s revolution and subsequent transition to democracy. Having been sidelined in the police state of now-ousted leader Zine el-Abidine Ben Ali, the military had little incentive to stand by or return to Tunisia’s authoritarian past.

While much ink has been spilled on how the Tunisian military has influenced the democratic transition, little has been written on how the transition has influenced the military. New research published for the Carnegie Endowment for International Peace finds that the long-marginalized Tunisian military has begun to see its position improve after the revolution. These changes point to a gradual restructuring of the polity away from Ben Ali’s police state and toward one in which the various security apparatuses are more evenly balanced. This rebalancing may have important implications for Tunisia’s capacity to confront its grave security threats, for the prospects for security sector reform, and for the likelihood of democratic consolidation.

When Tunisia’s first president, Habib Bourguiba, came to power in 1956, the coups he saw in Egypt, Syria and Iraq encouraged him to keep his own military weak and counterbalanced by the police and National Guard. This strategy was tenable in Tunisia, as there was a largely peaceful independence movement, no national army to inherit from the colonial era, and few external security threats throughout most of the 1960s and ’70s.

The marginalization of the military intensified under Tunisia’s second president, Ben Ali. A military general himself, Ben Ali briefly flirted with the military upon coming to power, but a fictitious military coup attempt concocted by the envious police and ruling party in 1991 pushed him to sideline the military once more. For the next two decades, Ben Ali privileged the police materially and politically, leaving the military underfunded, underequipped and far from political power. By the time he was ousted in the 2011 revolution, the budget of the Defense Ministry was barely half that of the Interior Ministry.

Since the revolution, however, the balance between the military and police is beginning to be recalibrated. Faced with severe security threats, Tunisia’s post-revolution leaders have been forced to strengthen the armed forces. The Defense Ministry’s budget has increased more quickly than any other ministry since 2011, growing by an average of 21 percent each year. If current trends continue, it is set to overtake the Interior Ministry’s budget and consume the largest share of the government’s budget in six to seven years. The military has also enjoyed a steady stream of new weapons contracts and international partnerships, especially with the United States, which tripled military aid to Tunisia in 2015.

Accompanying the army’s growing military might is greater political influence. As Tunisia transitioned to a parliamentary system, management of the military shifted from the personalized rule of previous autocrats to a shared responsibility between the president and prime minister. The institutional rivalry between these two executives over the military led each to appoint security councils and a military adviser, inadvertently institutionalizing a larger role for the military in national security issues.

Another indicator of the Tunisian military’s growing political importance is its number of appointments to traditionally civilian posts. During Ben Ali’s 23-year tenure, only one military officer was appointed as a governor. In just five years after the revolution, 11 current or retired military officers have assumed governorships, some for multiple terms in different governorates.

As the military’s power has increased, Tunisia’s leaders have been keen to promote loyal officers. Privileging loyalists is not a new strategy, but the changing face of Tunisia’s political leadership has spelled a changing demographic composition of the top brass. Prior to the revolution, senior officers most often hailed from Tunis and the Sahel — the wealthy coastal region, which includes Sousse, Monastir and Mahdia, from which Bourguiba and Ben Ali hailed. These areas amounted to just 24 percent of Tunisia’s population yet claimed nearly 40 percent of the officers promoted to the Supreme Council of the Armies under Ben Ali.

However, Tunisia’s post-revolution leaders gained much of their support from the marginalized interior. In the wake of Egypt’s July 2013 coup, these leaders, especially President Moncef Marzouki, ensured the military’s loyalty by reshuffling the top brass to bring in officers from these historically underprivileged regions, signaling the end of the favoritism of Tunis and the Sahel.

Perhaps the sharpest break with the Ben Ali era has been the entrance of retired officers into Tunisia’s robust civil society. Retired officers have capitalized on the newfound freedom of association to form a number of civil society organizations, lobbying the government and shaping the public debate over the military and its needs.

Retired officers provided guidance during the drafting of the 2014 constitution, consulted presidential candidates on defense policy, and successfully lobbied for transitional justice for officers caught up in the fabricated coup attempt of 1991. These retired officers in civil society are now pushing for a number of reforms to make the military more effective, among them a comprehensive defense policy to be produced by the Ministry of Defense then approved by the parliament.

While three terrorist attacks in 2015 put this issue on the back burner, Defense Minister Farhat Horchani recently renewed his pledge to produce a white paper on defense policy with the help of civil society, parliament and international partners.

These developments suggest that the long-marginalized Tunisian military is becoming a force in its own right. “Without a doubt, things have improved,” said retired chief of staff of the armed forces Gen. Said El Kateb. “Ben Ali relied on the police. Now, each institution has seen its capabilities enhanced. The military has importance, the police has importance, the national guard has importance. Each has a unique mission to fulfill.”

This rebalancing among Tunisia’s security apparatuses — assuming it continues — could have major implications, foremost among them the strengthening of the military’s ability to counter terrorism. Second, this rebalancing could spell the relative weakening of the police’s lobbying power and potentially an opportunity to pressure the Ministry of the Interior to initiate internal reforms.

Those interested in democracy may naturally be wary of the growing influence of the military in the new Tunisia. In the short to medium term, however, a military coup is unlikely given that the police and National Guard will remain powerful counterbalancing forces to the military.

The potential threat to democracy in Tunisia is less a coup emanating from the armed forces and more that the current president, Beji Caid Essebsi, could coopt the strengthened military and security forces to repress Tunisians on his behalf, allowing him to govern autocratically.

Growing disillusionment with the transition and a yearning for a strongman to impose order make this a distinct possibility, but the strength of Tunisia’s civil society and the commitment of its major political parties to consensus and compromise give hope that this scenario will remain just a possibility.

Sharanbir (Sharan) Grewal is a PhD candidate in Politics at Princeton University. This post is adapted from “A Quiet Revolution: The Tunisian Military After Ben Ali” published by the Carnegie Endowment for International Peace. Follow him on Twitter @sh_grewal.