Ali Abdullah Saleh in 2011. (Mohammed Huwais/Getty Images)

Ali Abdullah Saleh, the authoritarian president of Yemen who steered his impoverished Middle Eastern nation for more than three decades, was forced from office after a violent uprising but remained a powerful and divisive figure in the country’s ongoing civil war, was killed Dec. 4 in Yemen amid escalating fighting. He was 75.

Members of his political party as well as a Yemeni rebel group reported his death, but the exact circumstances could not immediately be confirmed. Pictures circulated on social media showed Mr. Saleh’s body cradled in a floral blanket, with what appeared to be a large head wound.

In November 2011, several months after he was nearly assassinated in a bomb attack, Mr. Saleh bowed to protests against his rule that were part of the Arab Spring uprisings and reluctantly agreed to leave office. The protests had focused on Mr. Saleh’s inability to address rampant unemployment, virulent corruption and the security challenges in Yemen, a bastion of Islamist militancy that fell further into chaos as the protests raged.

But for Mr. Saleh, who once described his job as “dancing on the heads of snakes,” the resignation was hardly his final chapter.

He evaded pressure from Western and regional allies pushing him to leave Yemen. Instead, Mr. Saleh, who retained the loyalty of powerful security ­forces, struck up an unlikely alliance with a Yemeni rebel group known as the Houthis, and together they drove the government of President Abed Rabbo Mansour Hadi — Mr. Saleh’s vice president and handpicked successor — into exile in Saudi Arabia in 2015.

From left, Yemeni President Ali Abdullah Saleh, Libyan leader Moammar Gaddafi and Egyptian President Hosni Mubarak in 2010 at a summit in Sirte, Libya. (Asmaa Waguih/Reuters)

The bloody civil conflict that followed had the elements of a regional proxy war, drawing in Saudi Arabia, its nemesis Iran as well as the United States. The conflict has killed more than 10,000 people and sparked a vast humanitarian crisis.

A former military commander, Mr. Saleh ascended to office in 1978 and proved an unusually resilient president for much of his time in power. His two immediate predecessors, one of whom had been his mentor, were assassinated within months of each other.

As wily as he was ruthless, Mr. Saleh had long ruled by carrot and stick, letting patronage and crucial tribal alliances determine key political appointments. He mercilessly quashed coup attempts and once ordered the execution of 30 military officers for their suspected role in a plot to overthrow him. Support from the United States, which considered Mr. Saleh a key counterterrorism partner against a potent al-Qaeda affiliate in Yemen, helped cement his grip on power.

With unrepentant violence, he dismantled secessionist schemes­ to undo the strategic unification he had brokered years earlier between North and South Yemen. Soon after unification in 1990, Mr. Saleh helped arrange a deal to tap a newly discovered oil field that pumped cash into the nation’s budget. He oversaw the creation of a new constitution and the first democratically elected parliament.

For a brief period, Yemen was lauded as a model emerging democracy in the Middle East, but it remained a republic in name only. Although Mr. Saleh cultivated a reputation as a consensus builder, he alone dominated the political scene.

Yemen, on the southern end of the Arabian Peninsula and a gateway to the Red Sea, became a stronghold of Islamist militancy and international terrorism during Mr. Saleh’s tenure.

The U.S. government showered hundreds of millions of dollars on Mr. Saleh to equip and train Yemen’s army and special ­forces. Mr. Saleh also approved a deal to allow U.S. forces­ to fly Predator drones armed with Hellfire missiles over Yemen.

Yet, despite anti-terrorism efforts, Yemen became home to one of al-Qaeda’s most sinister affiliates. The terrorist group’s late leader, Osama bin Laden, had Yemeni roots on his father’s side. The U.S.-born Anwar al-Awlaqi, a top-ranking al-Qaeda leader, was killed in a drone strike in Yemen in 2011. U.S. officials considered the affiliate — al-Qaeda in the Arabian Peninsula — the terrorist network’s most dangerous threat to the United States. The group sent parcel bombs on flights into the United States in 2010 and orchestrated a foiled plot to bomb an airliner over Detroit on Christmas Day 2009.

In 2000, terrorists detonated a bomb in Yemen’s Aden harbor that killed 17 Americans aboard the USS Cole, a Navy destroyer. Some of the 9/11 hijackers reportedly trained and lived in Yemen for a time.

Mr. Saleh had for years tolerated the militants and used their tribal links to maintain peace in his fractured country. Critics said Mr. Saleh frequently exaggerated the reach of al-Qaeda to attract financing from the West and to solidify his authority.

Ali Abdullah Saleh was born on March 21, 1942, in Bayt al-Ahmar, about 20 miles southeast of Sanaa. His family was part of the powerful Hashid tribal confederacy.

With only minimal schooling, he received a prestigious commission to the North Yemen army with the help of tribal patrons. One of Mr. Saleh’s early mentors in the military was Ahmad al-Ghashmi, an officer who became army chief of staff and president of Yemen. Mr. Saleh climbed in rank and became more involved in political affairs.

After Ghashmi, then the president, was killed by a briefcase bomb in 1978, Mr. Saleh maneuvered to succeed him. A month later, Mr. Saleh was elected leader of North Yemen, an Arab nationalist country that he united with the Marxist-oriented South Yemen in 1990 after the end of the Cold War. South Yemen had once been a British protectorate, focused on the valuable southern port of Aden.

Soon after taking office, he sought to “coup-proof his regime” by placing close family and tribal kin into high-profile positions in the military, according to April Alley, a senior Arabian Peninsula analyst at the International Crisis Group.

Mr. Saleh had five children and installed his son Ahmad as chief of Yemen’s special ­forces. A complete list of survivors was not immediately available.

Mr. Saleh established close relations with Iraq’s Saddam Hussein and Palestinian leader Yasser Arafat to counter the influence of wealthy neighbor Saudi Arabia. Mr. Saleh sided with Hussein when Iraq invaded Kuwait in 1990 to set off the Persian Gulf War.

The move proved financially disastrous for Mr. Saleh and Yemen. The United States dropped all foreign aid to Yemen, and Saudi Arabia expelled more than 800,000 Yemeni workers. At the time, Mr. Saleh’s government was dependent on U.S. aid money and remittances from Yemenis working in Saudi Arabia.

To maintain his grip on the presidency, Mr. Saleh kept a robust network of cronies happy by stuffing their pockets with cash from Yemen’s oil profits. “He was an expert at co-optation, divide-and-rule politics and managed chaos,” Alley said. “He was able to gradually consolidate power over time by including these powerful constituencies in networks of patronage and privilege.”

Ultimately, Mr. Saleh’s network failed him. Yemen remained one of the world’s poorest countries and had one of the highest rates of malnutrition, according to the U.N. World Food Program. During Mr. Saleh’s tenure, Yemen’s stark rate of illiteracy and unemployment remained among the region’s worst.

In early 2011, Yemenis were inspired by the revolutionary fervor that ignited in Tunisia and Egypt. Pro-democracy demonstrators gathered daily in the streets of Sanaa, the Yemeni capital, to demand Mr. Saleh’s ouster.

Instead of democratic change, the protesters’ pleas were met with bullets and tear-gas canisters from Mr. Saleh’s loyalist army and special ­forces. Mr. Saleh’s legitimacy dissolved after more than 150 Yemeni citizens were killed in clashes­ throughout the country. Yemeni diplomats left their posts to protest the bloody crackdown, and army generals defected to the opposition.

On June 3, 2011, a bomb exploded inside Mr. Saleh’s presidential compound, killing four of his bodyguards and injuring several key members of his government. Mr. Saleh suffered burns and shrapnel ­injuries. After leaving Yemen for treatment, he returned in September, wearing special gloves and with his face badly scarred.

Frustrating human rights groups, Mr. Saleh reneged three times on offers to resign in exchange for immunity. In the end, faced with pressure from the United States and its Western allies, as well as regional powers, Mr. Saleh stepped down. But it was not before he managed to snag a major concession: He would be allowed to remain in Yemen, residing at one of his numerous homes in Sanaa.

In the months after Mr. Saleh left office in 2012, Yemeni factions loyal to the former president skirmished with government ­forces. Amid the simmering civil war, al-Qaeda terrorists raided towns in southern Yemen, released suicide bombers on missions to attack government installations and American targets, and ruled over swaths of the country.

By late 2014, Mr. Saleh had joined forces­ with the Houthi rebels as they entered the capital. During his rule, he had fought six civil wars against the deeply religious northern rebels. They, in turn, viewed his regime as corrupt. But in a marriage of convenience, they pushed out Hadi and seized control over the capital and much of northern Yemen.

By last week, the tensions had boiled over, triggering fierce clashes­ between the Houthi fighters and Mr. Saleh's loyalists. And Mr. Saleh, the master tactician who ruled a fractious Yemen through tumult and despair, became the civil war’s most well-known casualty.

Shapiro is a former Washington Post staff writer. Kareem Fahim and Sudarsan Raghavan contributed to this report.