Last weekend, Houthi rebels assassinated Yemen’s former president Ali Abdullah Saleh. For nearly 40 years, Saleh was the most powerful man in Yemen. Even after he was forced to resign as president in the wake of a popular uprising in 2012, he remained the center of gravity in Yemeni politics.

Most Yemenis have never known a Yemen without Ali Abdullah Saleh as its president or as a central political figure. In so many ways his—at times ruthless and always Machiavellian—rule defined modern Yemen. His grisly death at the hands of his enemies turned allies turned enemies again will reverberate for months and years to come. The already brutal and complex civil war in Yemen will only become more so.

There is a Yemeni poem that contains a repeated stanza that translates roughly as: cycles of revenge bring only cycles of sorrow. Saleh, like most Yemenis, was a fan of poetry, which is still a high art in Yemen. His assassination was itself an act of revenge, part of a cycle that he himself set in motion when he ordered the killing of Hussein al-Houthi in 2004, the founder of the revivalist movement who would go on to inspire the Houthi rebels. Members of the Houthi family swore revenge on Saleh and his family after that, and 13 years later they finally delivered.

The Houthis, who have proven to be as calculating as Saleh, were waiting for the opportunity to exact revenge and consolidate their power. By announcing that he was open to negotiations with Saudi Arabia, Saleh provided the Houthis with what they had been waiting for: an excuse to attack him and those closest to him. For months, if not years, the Houthis had been slowly co-opting Saleh’s own network of ranking officers and tribal officials. It was a tactic that their leadership learned from Saleh himself who was an expert at co-opting and liquidating rivals.   

Saleh grew up poor, a member of what was then a weak tribe, the Sanhan. His education was limited to military training. Yemenis loved to make fun of his unpolished Arabic in his televised addresses. He began his career as an enlisted man and was then commissioned as second lieutenant. He participated in the coup against north Yemen’s ruler Imam Muhammad al-Badr, and by the mid-1970s, he was a full colonel. For a man from an insignificant family that belonged to an insignificant tribe, his rapid progression from enlisted man to full colonel and then to president was nothing less than meteoric.

Saleh’s rise to power was facilitated by ruthlessness—he did not hesitate in having his enemies lined up against a wall and shot—and an acute understanding of the men and country he sought to control. Saleh had a prodigious memory and could recite tribal lineages with ease. He knew who fit in where and who he needed to win over or eliminate. At the same time, for much of his 34-year reign (first as president of north Yemen and then as the first president of a unified Yemen in 1990) he understood that certain lines must not be crossed. There were limits to his ruthlessness. He knew that only so many cycles of revenge could be managed at once.

After 9/11, Saleh’s understanding of the limits of his power shifted. For much of his reign he was referred to as the mayor of Sana’a because his writ did not extend beyond Yemen’s capital. The United States, as part of its “war on terror,” began training and funding Yemen’s armed forces, ostensibly so they could engage al-Qaeda. For Saleh and those closest to him, the war on terror was a gift. The influx of money, high-tech weaponry, and special forces trainers dramatically enhanced the power of Yemen’s elite Republican Guard, which was controlled by Saleh’s eldest son, Ahmed Ali Saleh. The gloves came off but not in the fight against al-Qaeda. This was the goose that laid the golden egg.

Instead, Saleh went after the Houthis and southern separatists with a vengeance. He forgot that his power had limits. He forgot that he was trying to rule over one of the best-armed countries in the world where revenge is regarded as a sacred duty by many, even if it takes decades to secure.

In the north, the Houthis fought his forces to a standstill and in the south rightfully aggrieved southerners resisted his efforts to continue marginalizing them economically and politically. By 2011, with the “Arab spring” raging across the Middle East, Saleh’s grip on power had waned, yet he and those close to him refused to recognize that his time had passed. Troops under the command of his son and nephew opened fire on protesters in Sana’a and elsewhere as he fought to retain control of a country that he viewed as his and his family’s property. In June 2011, Saleh survived the bombing of the mosque at his presidential palace and was flown to Saudi Arabia where he underwent rounds of surgery. Defiant and wily as ever, he slipped past his Saudi minders and returned to Yemen where he engineered a handover of power to his ineffectual vice president, Abd Rabbo Mansour Hadi.

Hadi never stood a chance against Saleh who was openly referred to by generals and cabinet ministers as the “president of the president.” Saleh continued to exert influence even when he underwent successive rounds of painful surgeries for injuries sustained when his mosque was bombed. His defiance and determination to return to power, or at least to secure power for his son Ahmed Ali Saleh, were undiminished.

In September 2014, Houthi rebels took over Sana’a with little fighting. Saleh and the generals who remained loyal to him had made a deal with the men they’d battled since 2004. Saleh was betting on his ability to co-opt and in time eliminate his rivals while leveraging their military prowess. This bet did not pay off. The Houthis beat him at his own game. Instead of co-opting them, they instead incorporated many of those officers and forces that had been loyal to Saleh and his sons.

After years of staying one step ahead of a legion of enemies, Saleh’s last gamble cost him his life and will likely cost thousands more Yemenis theirs. He bet on support that was not there and he underestimated his enemies. The poor boy who fought his way to the top and managed to stay there for nearly 40 years was in the end a victim of the cycle of revenge—a cycle that, if it is not stopped, threatens to destroy a nation of 26 million.

The Houthis’ leadership would do well to look closely at the footage that their men captured of Saleh’s body. It could just as easily be footage of them in the coming months if they continue to ignore the limits of their power. While support for Saleh was a fraction of what it once was, his death could bring a kind of redemption. Saleh’s defiance, determination, a wicked sense of humor, and undeniable charisma may well blot out his legacy of corruption and violence.

Michael Horton is a senior analyst for Arabian affairs at the Jamestown Foundation. He is a frequent contributor to Jane’s Intelligence Review and has written for numerous other publications including The National Interest, The Economist, and West Point’s CTC Sentinel.