Sana’a: Yemen’s steely former president of 33 years, Ali Abdullah Saleh met his death at the hands of Al Houthi militants, his erstwhile allies in the country’s multi-sided civil war.

A master of weaving alliances and advancing his personal and family interests in Yemen’s heavily armed and deeply fractious tribal society, Saleh unified his country by force, but he also helped guide it towards collapse in its latest war.

The Middle East’s arch-survivor once compared running Yemen to “dancing on the heads of snakes”, ruling with expertly balanced doses of largesse and force.

Cornered by pro-democracy “Arab Spring” protests, Saleh wore a cryptic smile when signing his resignation in a televised ceremony in 2012.

Saleh waged six wars against Al Houthis from 2002 to 2009 before he made an impromptu alliance with the militant group that seized the capital Sana’a in 2014 and eventually turned on him.

The two sides feuded for years for supremacy over territory they ran together.

Saleh’s army loyalists and Al Houthi militants came under attack from the Saudi-led military coalition that intervened to uphold the legitimacy of the internationally recognised government of President Abd Rabbo Mansour Hadi.

As the conflict wrought a humanitarian crisis, mutual sniping about responsibility for economic woes in northern Yemeni lands that they together rule peaked on Wednesday when the capital erupted in gun battles between their partisans.

Saleh had seemed unshakeable in one of the world’s poorest and unstable countries. He managed to play his enemies off against each other as tribal warfare, separatist movements and extremists destabilised Yemen.

He survived a bomb attack in his palace mosque in 2011 which killed senior aides and disfigured him. As other leaders were toppled by the Arab Spring uprisings, he found a way to retire peacefully to his villa in the capital and plot a comeback.

Born in 1942 near Sana’a, he received only limited education before joining the military as a non-commissioned officer in 1962.

His first break came when President Ahmad Al Gashmi, who came from the same Hashed tribe as Saleh, appointed him military governor of Taiz, North Yemen’s second city. When Al Gashmi was killed by a bomb in 1978, Saleh replaced him.

In 1990, the collapse of the Soviet Union helped propel North Yemen under Saleh and the socialist South Yemen state into a unification. In 1994, he crushed a secession bid in the south.

Saleh angered Gulf Arab allies by staying close to Saddam Hussain during the 1990-91 Iraqi occupation of Kuwait.

But he then won plaudits from Western powers for carrying out economic reforms drawn up by the International Monetary Fund and World Bank, and made efforts to attract foreign investors.

He swept to victory when southerners tried to secede from united Yemen in 1994 and drew closer to Saudi Arabia.

Despite being forced to step down in 2012 under a Gulf-brokered transition plan following protests against his rule, Saleh won immunity in the deal and remained a powerful political player.

Saleh became the ruler of North Yemen in 1978 at a time when the south was a separate, communist state, and led the unified country after the two states merged in 1990.

Opponents often complained that Yemen under Saleh failed to meet the basic needs of the country’s people, where two of every three live on less than $2 per day.

Saleh managed to keep Western and Arab powers on his side, styling himself as a key ally of the United States in its war on terrorism. He received tens of millions of dollars in US military aid for units commanded by his relatives.

After the 9/11 attacks, Yemen came onto Washington’s radar as a source of foot soldiers for Al Qaida network. Bin Laden was born in Saudi Arabia though his family came from Yemen’s Hadramout region.

Saleh cooperated with US authorities as the CIA stepped up a campaign of drone strikes against key Al Qaida figures, which also led to scores of civilian deaths.