CAIRO -- Street protests against Sudan's President Omar al-Bashir show no sign of abating. A growing number of his former allies are clamoring for his departure. None of his friends in the region are stepping up to help. One of the Mideast's longest autocrats may be on the way out.

But if al-Bashir, who came to power in a 1989 military coup, seeks to cling to power, it could mean greater violence and economic paralysis for Sudan and a new stage in a dark history of strife, military dictatorships and political polarization.

Once Africa's largest nation, Sudan under al-Bashir was prominent on the world stage in the 1990s and 2000s for all the wrong reasons.

It was the scene of a long civil war between the mostly Christian and animist south and the Muslim and Arabized north. It hosted Osama bin Laden in the early years of his jihadi movement that led to the creation of al-Qaida, landing Sudan a spot on the U.S. list of countries backing terrorism.

In the 2000s, it was most known for the brutal repression of an uprising in its western Darfur region, when the pro-government militias known as the Janjaweed became notorious for atrocities and al-Bashir himself was indicted by the International Criminal Court for alleged war crimes and genocide.

After the south gained independence in 2011 in a referendum that al-Bashir agreed to in a peace treaty, Sudan lost a third of its territory and fell out of the international spotlight. In the years since, it languished in increasing economic misery.

That misery erupted several times into protests, each time put down by al-Bashir. He has tried to do the same in the latest unrest, sparked on Dec. 19, initially over steep price rises and shortages. Dozens have been reported killed, and al-Bashir has arrested opposition leaders, imposed emergency rule and curfews in multiple cities and suspended classes in schools and universities.

Here is a look at Sudan's modern history and how recent events may shape its future:

———

HOW DID SUDAN GET HERE?

Since independence in 1956, Sudan has bounced between tumultuous party politics and military rule, while trying to hold together a north and south joined under British colonialism. Southern rebels took up arms the year before independence, starting the first civil war. In 1958, the military seized power, ruling for six years until a wave of riots and strikes in 1964. Elections were held, and a series of governments took office, all of which failed to end the war or agree on a permanent constitution.

Army officer Jaafar al-Nimeiri led another military coup in 1969. He dissolved parliament and outlawed political parties, starting 16 years of authoritarian rule. He fended off several coup attempts, including one by Communists in 1971 and another by followers of Imam al-Mahdi, a messianic religious figure from the late 1800s. In 1972, he reached a peace deal ending the war in the south.

The south relaunched its insurgency 11 years later and the guerillas' ranks swelled when al-Nimeiri introduced Islamic Shariah law. After a popular uprising, the military removed al-Nimeiri in 1985 and — in a rare move for the region — quickly handed power to an elected government. The dysfunctional administration lasted only a few years until al-Bashir — a career army officer — allied with Islamist hard-liners and toppled it in a coup.

———

Al-BASHIR'S OWN MAKING?

Bashir's 29 years in power will likely be remembered as the most oppressive in Sudan's modern history.

He began by trying to militarily crush the southern rebellion. Predictably, it did not work.

From Khartoum, his rule was based on his Islamist-military alliance, presenting himself as a leader of the 1990s wave of "political Islam" while building ties with violent jihadis. Using Islamist ideology as a rallying cry, al-Bashir created loyalist militias to protect his rule and built a political machine of businessmen and politicians that held a lock on power and amassed massive wealth in the impoverished nation.

His renewed imposition of Islamic law alienated many and tore apart the social fabric of a country with a rich religious and ethnic composition. His use of Islamic militias in Darfur made him an international pariah. Partly trying to salvage his standing, he signed the peace deal with the south.

But as it gained independence, the south took with it three quarters of Sudan's oil resources, leaving the north without an economic engine. Since then, al-Bashir's main priorities have been keeping his lock on power while floundering for ways to repair the economy. He has manipulated shifting international alliances, playing regional powers against each other in hopes of financial aid and investment.

His relations with Egypt, Sudan's powerful neighbor to the north, are a case in point.

Sudan has sided with Ethiopia in a dispute with Egypt over an Ethiopian dam being built, seen by Cairo as a threat to its share of Nile River water — and al-Bashir stoked an old border dispute with Egypt. But then he had to quickly try mend relations with Egypt after Sudan's economic crisis worsened with the devaluation of its currency in October.

Al-Bashir has also cultivated oil-rich Saudi Arabia and the United Arab Emirates, receiving extensive aid after he sent troops to Yemen to fight alongside the two against Shiite Houthi rebels. But their trust — and Egypt's — has been undermined by his wooing of their rivals, Qatar, Turkey and Iran.

———

WHAT ARE AL-BASHIR'S OPTIONS?

Al-Bashir's domestic alliances have shown signs of crumbling in the face of the latest protests. The military and police are sitting on the fence. Political groups, including Islamists who were once allied with his National Congress Party have joined street calls for him to step down.

Those defections undermine al-Bashir's faltering response to the crisis, which he has tried to depict as a struggle against secularists backed by Western plots aimed at wrecking Sudan's Islamist "experiment." He has used religious rhetoric, telling a public struggling to get by that God will provide and quoting Quran verses to security officials in an attempt to justify killing protesters.

He has options for political survival, but likely at the price of reducing his powers. He formed an investigation committee that could try to give him cover by prosecuting some accused of using lethal force against protesters or indicting businessmen and politicians for manipulated the market for personal gain. He may also try bringing political rivals into a new, inclusive government, or announce he will not run in elections set for 2020.

But he also may dig in, forcing the military and police to choose whether to back him or turn against him definitively, prompting new turmoil.