In power for 33 years, Saleh in 1978 had become the president of what was then North Yemen, before leading the country following its unification in 1990.
Yet, by 2011, many felt Saleh's long-running rule was only serving his interests - and demanded change.
Hundreds of thousands of Yemenis filled the streets in the first two months of 2011, protesting against poverty and unemployment. As weeks passed, the protesters' calls escalated from demanding government reforms to seeking Saleh's removal, accusing him of mismanaging the economy and corruption.
It was a time of major economic upheaval. Inflation was rising, and so was unemployment. Money from the country's dwindling oil reserves had been wasted or stolen - according to a 2015 United Nations report, Saleh had amassed a vast fortune worth up to $60bn from corruption, extortion and embezzlement.
In order to stay afloat, Yemen relied on US aid, as well as assistance from its neighbouring countries.
In early 2011, student-led demonstrations in the capital, Sanaa, quickly spread to other cities, including Aden and Taiz.
The protests prompted a brutal crackdown which resulted in the killing of at least 50 people.
The deaths caused a public outcry, triggering mass resignations of government ministers and high-ranking military officials. Saleh, who had previously rejected a proposal by opposition groups that would see him leave power peacefully, indicated in March that he planned to step down.
Yet a month later, the president changed tack, refusing to sign a Gulf Cooperation Council (GCC)-brokered agreement, which called for his immunity and for the opposition to join a coalition with his ruling party.
While the opposition backed the agreement, after a period of hesitation, Saleh refused to sign it on three different occasions - triggering unrest.
Failed political transition
Eventually, the protests forced Saleh to hand over power to his deputy, Abd-Rabbu Mansour Hadi, for a two-year period as part of the GCC transitional deal.
Yet the political transition was anything but smooth in a country hit by mass unemployment, food insecurity, suicide bombings and a burgeoning separatist movement in the south.
In early 2012, Hadi ran as the sole candidate in Yemen's presidential campaign, which was boycotted by the opposition groups, including the Shia Houthis and the separatist Southern Movement.
Nevertheless, with a 65 percent voter turnout, Hadi became president in a referendum-like election that was supported by the international community.
The new president, however, struggled to impose his authority.
As new alliances were formed, Houthi rebels and Saleh supporters, who were previously at odds, teamed up to fight forces loyal to Hadi's government.
In September 2014, the Iranian-backed Houthis took over Yemen's capital, Sanaa. At the start of 2015, the rebels tried to take over the entire country, eventually forcing Hadi to flee to Saudi Arabia, where he has been ever since.
The Saudi-led coalition
Saudi Arabia considered the Houthis a threat and a proxy of Iran. It labelled them a "terrorist" organisation amid fears the situation in Yemen could be an opportunity for Tehran to gain a foothold on the kingdom's border.
Iran denied any involvement, but that did not stop Saudi Arabia from forming a military alliance of 10 countries to target the Houthis.
In March 2015, the Saudi-led coalition began its air campaign, code-named Operation Decisive Storm.
According to Saudi Arabia, the coalition aimed to "shift from military operations to the political process" in order to restore Hadi's government.
However, it has been unsuccessful so far in wresting the north of the country and Sanaa out of Houthis' control.
Initially, the Saudi-led coalition's participating nations also included Kuwait, Bahrain, Qatar, Jordan, the United Arab Emirates (UAE), Egypt, Morocco, Senegal, and Sudan. Qatar was expelled from the coalition in June 2017, after Saudi Arabia, Bahrain, the UAE and Egypt imposed a land, naval and air blockade on the country, accusing it of supporting "terrorism".
The United States backed the coalition but did not join in direct military action. Washington's role was focused on providing logistics and intelligence support for the coalition's air campaign.
Meanwhile, fighters from al-Qaeda in the Arabian Peninsula (AQAP) and Islamic State of Iraq and the Levant (ISIL, also known as ISIS) affiliates took advantage of the chaos by seizing parts of the south and stepping up their attacks in government-controlled Aden, Yemen's second city.
Largest humanitarian crisis
Thirty-three months on, a combination of Saudi-led air raids, a naval and land siege, and fighting on the ground have devastated Yemen, turning it into the world's largest humanitarian crisis with civilians bearing the brunt of the war.
According to the UN, at least 10,000 people have been killed so far.
Seven million Yemenis face famine, and 18.8 million people are in need of some form of humanitarian assistance. Cooking gas prices have surged, while medicine and fuel are in short supply.
According to the International Committee of the Red Cross (ICRC), 2.5 million people have no access to clean water and one in every 12 is severely malnourished.
The war has also displaced 3.3 million people since its beginning.
Foes to allies to foes
With neither side making any significant progress in the battlefield, the situation in Yemen remained in a deadlock. But the tactical alliance between Saleh and the Houthis recently began to splinter, both highly suspicious of each other's motives but united by the fighting against the pro-Hadi Saudi-led coalition.
A week ago, that fragile alliance came to end, with Houthi and Saleh loyalists turning against each other - not for the first time. During his presidency, Saleh was a close ally of the Saudis and fought the Houthis several times. Known for his Machiavellian political manoeuvring, he had once described governing Yemen like "dancing on the heads of snakes".
On Saturday, Saleh publicly said that he is willing to engage in talks with Saudi Arabia if the latter would stop the fighting and end the blockade.
"We will open a new page for them, a new dialogue. What is happening in Yemen in enough," he said.
"We vow to our brothers and neighbours that, after a ceasefire is in place and the blockade is lifted ... we will hold dialogue directly through the legitimate authority represented by our parliament."
A statement by the Houthis described Saleh's actions as "a coup against our alliance and partnership ... and exposed the deception of those who claim to stand against aggression".
Death of a former president
On Monday, Saleh's long and dominant presence in Yemeni affairs came to an end after being killed near Sanaa. Houthi sources said Saleh was killed by the rebels in a rocket-propelled grenade and shooting attack on his car.
Analysts believe that Saleh's death will likely stir the political stalemate in Yemen, possibly throwing the country into further chaos.
"The Yemen that we are experiencing today is not the Yemen of yesterday, and the question remains whether the Yemen of tomorrow will look like the Yemen of today," analyst Adam Baron told Al Jazeera on Monday, after news of Saleh's death broke out.
"The only thing we truly know is that things have changed - and changed irrevocably," he added.
"Saleh was not just an actor in this conflict. He was someone who effectively, for better or for worse, constructed modern Yemen in his own image and centred it around him as the leader.
"So now that he is removed, I think in many ways all bets are off."