Zimbabwe’s new president Emmerson Mnangagwa receives the chain and sash of office from Chief Justice Luke Malaba as he is officially sworn in during a ceremony in Harare on Nov. 24, 2017. (Jekesai Njikizana/AFP/Getty Images)

Zimbabwe’s ruling party, Zimbabwe African National Union — Patriotic Front, or (ZANU-PF), is convening a party congress. Typically held once every four years, Thursday’s event will bring together nearly 6,000 officials from all levels of the party.

The congress comes in the wake of last month’s military intervention in Zimbabwe, which forced president Robert Mugabe’s resignation after 37 years in power. Crowds poured into the street to cheer the end of Mugabe’s rule. Yet Mugabe’s replacement, former vice president Emmerson Mnangagwa, is a regime insider. He has since announced a Cabinet composed of ruling party loyalists and several military officials.

To understand these events, it is useful to pay attention to one factor that differentiates Zimbabwe from most of Africa’s authoritarian regimes: a powerful and well-institutionalized ruling party.

ZANU-PF has been a major force in Zimbabwean politics since independence

This congress’s first order of business will be to confirm actions taken by the party’s central committee in November, including appointing Mnangagwa as party head and president and expelling former first lady Grace Mugabe and other members of the G40, or “Generation 40,” faction. The congress’s larger task is to reunite a fractured party — and reestablish party control over the political system.

Since independence in 1980, ZANU-PF has been the central actor in Zimbabwean politics. The party is the result of a merger of the country’s two nationalist parties, each of which had an armed wing that fought a protracted liberation war against the white minority Rhodesian regime before Zimbabwe’s independence in 1980. As political scientists Steven Levitsky and Lucan Way point out, the political parties that emerge from violent conflict often prove surprisingly cohesive and durable. This has been true for ZANU-PF. The party has repeatedly relied on its liberation war credentials to maintain unity and discipline.

Scholars have long found that ruling parties can be critical in sustaining authoritarian rule. They can help prop up authoritarian regimes by distributing patronage and by discouraging ambitious politicians from defecting to opposition parties. Authoritarian regimes based on parties and elections often build stronger and better-performing states because their institutions allow elites to strike bargains and pursue shared goals. These and other methods have enabled ZANU-PF to prevent defections and fight off an opposition challenger, the Movement for Democratic Change (MDC), that would have defeated a weaker ruling party.

Ruling authoritarian parties have factions — ZANU-PF’s have been struggling for power

ZANU-PF has long been factionalized, and the battle over who would succeed Mugabe has been intense for about 20 years. As I show in my book, From Protest to Parties, the rise of the MDC and ZANU-PF’s use of political violence increased party polarization in the 2000s. Polarization helped preserve ZANU-PF’s cohesion and popular base.

After violent and disputed elections in 2008, however, ZANU-PF and the MDC agreed to share power and joined a government of national unity. Once the power-sharing agreement, brokered by South Africa, was in place, international aid again flowed in, leading to economic growth. ZANU-PF, however, was able to claim credit for these improvements. The MDC, meanwhile, lost the support of voters who opposed power-sharing and was rocked by corruption scandals. In the 2013 elections, ZANU-PF won a convincing victory.

Since 2013, ZANU-PF has turned its attention to its own internal disputes, especially the battle to name Mugabe’s successor. At the party’s last congress in 2014, Vice President Joice Mujuru, previously the odds-on favorite to succeed Mugabe, and several political heavyweights associated with her faction were ejected from the party. At the same congress, the G40 faction, which included first lady Grace Mugabe, captured several high party offices, including the organizing secretary of the party who has the power to discipline and eject party members.

In 2015, in a muscular move against Mnangagwa’s faction, the G40 began purging party structures, ejecting 140 grass-roots officials and seven members of parliament. Conflict intensified between the younger G40 faction and the ZANU-PF old guard, which includes Mnangagwa and other politicians who served in the liberation war. After Mujuru’s ouster, Mnangagwa won the support of the military and the country’s powerful war veterans association, while the weaker G40 pushed Mugabe to appoint his wife as his successor. On Nov. 9, urged by his wife and her G40 allies, Mugabe dismissed Mnangagwa.

Most commentators have pointed to Mnangagwa’s dismissal as the direct cause of Zimbabwe’s political crisis. For party elites, however, the struggle for control over the party may have been at least as important as Mugabe’s successor. Even if Mugabe had attempted to nominate his wife as vice president, there would have been substantial pushback from the party’s old guard, which continued to control the central committee and possibly other party organs. Three days before the military intervention, one of the party’s G40-controlled provincial committees recommended disciplinary action against several of Mnangagwa’s allies.

Since the party constitution bars members facing disciplinary action from contesting central committee seats or other party positions, this would have effectively barred the bulk of the party’s old guard from party leadership positions — and also endangered their ability to run for the 2018 parliamentary and senatorial elections on ZANU-PF tickets.

So how can ZANU-PF win elections after overthrowing their leader?

If we buy this analysis, Mugabe was removed by the military and its ZANU-PF allies both to install Mnangagwa and to regain control over party structures and nominations. Now that they have recaptured the party, these same party elites face a new political challenge: How does the party win an election after sponsoring a coup against its founding father?

This week’s party congress will give observers a sense of how well ZANU-PF will handle two major challenges in the run-up to the 2018 elections.

First, control over ZANU-PF’s grass-roots structures will be central to mobilizing voters and intimidating opponents, a perennial ZANU-PF electoral tactic. The party’s new leaders have already announced they will reconstitute the party’s district coordinating committees, which had been a casualty of recent factional struggles. Purges of provincial committees are already underway.

Second, at this congress, ZANU-PF faces the difficult task of embracing Mugabe’s legacy as founder while simultaneously justifying the party’s involvement in forcing his resignation. Mugabe remains popular with the party’s base. Earlier this year, an Afrobarometer survey found 56 percent of all Zimbabweans approved or strongly approved of the president’s performance. For a party that already lost support because of the 2014 Mujuru purge, keeping Mugabe loyalists is essential for continued electoral viability.

For long-serving ruling parties, transfers of power are fraught. Where parties are able to handle these crises and institutionalize succession, their organizations emerge stronger and more capable of dominating political systems for years to come, as we have seen from long periods of party dominance in Japan, Mexico, and Taiwan.

ZANU-PF’s first succession battle has been rocky and surprisingly public, but the party may yet emerge from this crisis with stronger organizational structures and greater party cohesion. If it does, Zimbabwe’s fractured opposition will face a tough fight in 2018.

Adrienne LeBas is an associate professor of government at American University. Follow her on Twitter at @amlebas.