Saleh was forced to step down after signing a power transfer deal in 2011, which granted him immunity. The deal was brokered by Saudi Arabia and its Gulf neighbours 10 months after protests started in the impoverished country in February, inspired by uprisings across the Arab world.
The protests deteriorated into fierce clashes between his supporters and opponents. An attack on his presidential palace in June 2011 left him severely injured, after which he spent three month in Saudi Arabia receiving treatment.
Saleh's rule was notorious for widespread mismanagement, rampant corruption, human rights abuses and the political manipulation of Yemen's tribal system to fend off threats in the north and south.
Even before the wave of popular protests, Saleh was facing major challenges and unrest in Yemen, one of the world's poorest countries.
In the northern part of Yemen, the Saleh government since 2004 had to battle a rebellion by the Shiite Houthis. He also fought al-Qaeda in the Arabian Peninsula (AQAP), considered by the United States to be one of al-Qaeda's most dangerous affiliates.
The group was active in Yemen and gained greater influence in the country as the conflict intensified following Saleh's ouster.
After he quit power, Saleh continued to lead the General People's Congress political party and formed a surprise alliance with the rebel Houthi group, which took over Sana'a in 2014.
However, the alliance started to fall apart a few months ago when Saleh called his allies a "militia" and said he was ready for talks with Arab countries leading a coalition that began an air campaign against the Houthis in March 2015.
Tensions heightened last week, as clashes between the two sides intensified in Sana'a, culminating in the Houthi forces blowing up Saleh's house and killing him.
Saleh, a member of the influential Sanhan tribe that is part of the northern Hashed tribes, was born in 1942 in the town of Bayt al-Ahmar, located around 30 kilometres south-east of Sana'a.
Before first becoming president of north Yemen in 1978, Saleh worked his way up the military ranks fighting with north Yemen's Saudi-sponsored royalists against republicans and communists in the southern part of the country, supported by Egypt's populist leader Gamal Abdel Nasser and the former Soviet Union in the mid-1960s.
The prolonged civil war eventually led to unification of the north and south in 1990 and Saleh assumed presidential power over all of Yemen.
Saleh consolidated his power by filling key military and administrative posts with members of his clan and at the same time sought to buy the support of other tribes.
Reunification lasted until 1993 when south Yemen started to complain about discrimination and economic dominance by the north. Civil war broke out again in 1994, but the attempted separation of the south lasted only two months.
During his years in power, Saleh has tried to portray himself as the only man able to maintain Yemen's unification and fight against terrorism, a discourse his detractors said was aimed at gaining military and political support from the West.
The protests deteriorated into fierce clashes between his supporters and opponents. An attack on his presidential palace in June 2011 left him severely injured, after which he spent three month in Saudi Arabia receiving treatment.
Saleh's rule was notorious for widespread mismanagement, rampant corruption, human rights abuses and the political manipulation of Yemen's tribal system to fend off threats in the north and south.
Even before the wave of popular protests, Saleh was facing major challenges and unrest in Yemen, one of the world's poorest countries.
In the northern part of Yemen, the Saleh government since 2004 had to battle a rebellion by the Shiite Houthis. He also fought al-Qaeda in the Arabian Peninsula (AQAP), considered by the United States to be one of al-Qaeda's most dangerous affiliates.
The group was active in Yemen and gained greater influence in the country as the conflict intensified following Saleh's ouster.
After he quit power, Saleh continued to lead the General People's Congress political party and formed a surprise alliance with the rebel Houthi group, which took over Sana'a in 2014.
However, the alliance started to fall apart a few months ago when Saleh called his allies a "militia" and said he was ready for talks with Arab countries leading a coalition that began an air campaign against the Houthis in March 2015.
Tensions heightened last week, as clashes between the two sides intensified in Sana'a, culminating in the Houthi forces blowing up Saleh's house and killing him.
Saleh, a member of the influential Sanhan tribe that is part of the northern Hashed tribes, was born in 1942 in the town of Bayt al-Ahmar, located around 30 kilometres south-east of Sana'a.
Before first becoming president of north Yemen in 1978, Saleh worked his way up the military ranks fighting with north Yemen's Saudi-sponsored royalists against republicans and communists in the southern part of the country, supported by Egypt's populist leader Gamal Abdel Nasser and the former Soviet Union in the mid-1960s.
The prolonged civil war eventually led to unification of the north and south in 1990 and Saleh assumed presidential power over all of Yemen.
Saleh consolidated his power by filling key military and administrative posts with members of his clan and at the same time sought to buy the support of other tribes.
Reunification lasted until 1993 when south Yemen started to complain about discrimination and economic dominance by the north. Civil war broke out again in 1994, but the attempted separation of the south lasted only two months.
During his years in power, Saleh has tried to portray himself as the only man able to maintain Yemen's unification and fight against terrorism, a discourse his detractors said was aimed at gaining military and political support from the West.