Ali Abdullah Saleh dominated political life in Yemen for decades, both during and after his longtime role as president.
A wily political operator, he managed to hold his disparate and poverty-stricken country together despite tribal squabbles and many insurrections.
A former ally of Iraqi leader Saddam Hussein, he switched his support to the US after the 9/11 attacks in return for millions of dollars in aid.
But his increasingly authoritative and corrupt regime was eventually ended after mass protests on the streets.
Ali Abdullah Saleh was born on 21 March 1942, a member of the Sanhan tribe.
He joined the army where he fought for the republican government in North Yemen’s civil war, which saw the Saudi-backed remnants of the monarchy pitted against the Egyptian-sponsored republicans.
When the North Yemen President Ahmed ibn Hussein al-Ghashmi was assassinated in June 1978, Saleh became one of a four-man ruling council.
A month later, the North Yemen parliament elected him as president.
Saleh set out to buy the support of the warring tribes and, to the surprise of many observers, he was re-elected in 1982, and again six years later.
He also set about the painstaking work of unification with Marxist South Yemen, a process which was speeded up with the collapse of the Soviet Union which had been the south’s main source of support.
In May 1990, Ali Abdullah Saleh was pronounced President of the new Republic of Yemen with Sanaa as its capital.
‘War on terror’
The early years of the republic proved troublesome. Civil war broke out in mid-1994 and the south seceded in May of that year. However, the separation lasted only two months before its military was crushed by the north, placing Saleh once again at the helm of a unified Yemen.
In its first free elections, Saleh’s General People’s Congress (GPC) won most seats but had to rule in a coalition with the Yemeni Socialist Party and Islamist Islah party.
Violence continued to remain a factor in Yemeni politics. The gradual return home, during the 1990s, of militant Islamists who had fought against the Soviet occupation of Afghanistan, fuelled dissent within Yemen.
Kidnapping reached almost epidemic proportions. The incidents were nearly all non-violent until a group kidnapped 16 western tourists in December 1998 and the resultant gun battle left four of them dead.
In October 2000, the American destroyer USS Cole was bombed by members of Islamic Jihad, linked to al-Qaeda, in the port of Aden, resulting in the deaths of 17 American sailors.
Internal dissatisfaction with the government grew when Saleh allowed the US authorities to hunt down the militants after the incident.
After the 9/11 attacks on the United States, Saleh visited Washington and in return for economic aid, allowed the CIA access to Yemen to wage its “war against terror”.
US military experts were deployed to train Yemeni special forces and to aid counter-terrorism efforts against al-Qaeda and its affiliates.
In June 2004, a former parliamentary deputy, Hussein al-Houthi, with links to Hezbollah in Lebanon, launched an armed challenge to the president’s authority.
Government forces quickly put down the rebellion but at the cost of hundreds of lives.
High levels of corruption led to an increase in poverty in the country during his rule. In July 2005, dozens were killed in riots when fuel subsidies were lifted.
Saleh was sworn in for another term of office in September 2006 after winning the presidential election with more than 77% of the vote.
But his failure to bring about much-needed economic and political reforms led to increasing opposition within Yemen.
Popular protests, influenced in part by events in Egypt and Tunisia, known as the Arab Spring, forced him to announce he would not stand again for election in 2013.
When he reneged on a promise in May 2011 that he would resign within a month, there were renewed protests. A month later he was badly injured when a rocket-propelled grenade struck his presidential compound.
After medical treatment in the United States, Saleh returned to Yemen in February 2012 triggering more protests. On 27 February he formally ceded power to his deputy Abdrabbuh Mansour Hadi and finally stepped down.
From 2014 Saleh and forces loyal to him backed Houthi rebels who seized Sanaa and forced president Hadi to flee to Saudi Arabia.
The unlikely allies fought against a brutal Saudi-led military campaign which sought to restore Hadi but devastated Yemen from 2015.
However ultimately it was his own erstwhile partners who killed him after days of clashes between the Houthis and Saleh loyalists.