(CNN)Zimbabwean President Robert Mugabe's decades-long grip on power in the southern African nation ended Tuesday with his resignation -- but the continent still has a few leaders who've been in charge for nearly as long, or longer.
Robert Mugabe was in power for 37 years, but he wasn't Africa's longest-ruling leader
Some long-serving African leaders have been buoyed by their suppression of opposition, and by abolished or manipulated term limits. At the top of Africa's current longest-tenured list are five men who've been in charge for more than 30 years.
There'd been seven leaders who'd served at least that long when 2017 began. But longtime Angolan President Jose Eduardo dos Santos stepped aside in September after 38 years of rule, and Mugabe resigned Tuesday after 37.
The five who remain in power are:
In power since: August 3, 1979, when he toppled his uncle -- an autocratic president who led the country after it gained independence from Spain in 1968 -- in a military coup.
Current election rules: The president is elected in a majority popular vote for seven-year terms, though presidential and legislative elections since 1996 "have generally been labeled as flawed," the CIA World Factbook says.
"The president exerts almost total control over the political system and has placed legal and bureaucratic barriers that prevent political opposition," according to the CIA publication.
Obiang last claimed victory in an April 2016 election, reportedly with 93.7% of the vote. Opposition members and human rights groups have questioned the election's fairness.
In power since: November 1982, when the then-prime minister succeeded a president who resigned.
Current election rules: Majority popular vote for seven-year terms. Last elected in October 2011, reportedly with 78% of the vote. No term limits.
"Despite slow movement toward democratic reform, political power remains firmly in the hands of President Paul Biya," the CIA World Factbook says.
In power since: It's complicated. He first was president from 1979 to 1992, when he was defeated in an election. He returned to power in 1997 during a civil war, eventually standing for and winning a presidential election in 2002.
Current election rules: Majority popular vote. Up to three five-year terms, though a 2015 constitutional referendum allowed Sassou-Nguesso to forgo the limits, according to Freedom House, a US nonprofit that promotes democracy.
The last election was in March 2016. After results were announced, the United States government said it was "profoundly disappointed by the flawed presidential electoral process in the Republic of Congo," adding that "widespread irregularities and the arrests of opposition supporters following the elections marred an otherwise peaceful vote."
In a separate statement about the elections that year, the US State Department criticized reports of a "media blackout during the polls, an imbalanced and restrictive media environment, significant disparity in access to state resources, a short timeframe for electoral preparations, and restrictions on freedoms of expression, communication, and association in the pre-election period."
In power since: January 1986, when Museveni, a guerrilla leader and former defense minister, ousted a military regime.
Current election rules: Majority popular vote for five-year terms, with no term limits. Museveni held the presidency for 10 years before he was chosen in the country's first direct presidential election in 1996. After his re-election in 2001, Parliament removed presidential term limits in 2005. He was elected for a fifth term in February 2016.
During that election, then-US Secretary of State John Kerry spoke with Museveni and "expressed his concern about the detentions of opposition candidate Kizza Besigye and harassment of opposition party members during voting and tallying," the US State Department said. Kerry "also expressed concern about the Government of Uganda's decision to block several popular social media and mobile money sites starting on Election Day."
In power since: April 1986, upon turning 18, nearly four years after the death of his father, the previous king.
No popular election for the king: Swaziland is Africa's last remaining absolute monarchy, which is hereditary. The country has an elected Parliament, and Mswati chooses a prime minster from among the elected members.