Plus ça change. .  .  . Algeria, ever obedient to the wishes of the army and Security Services, reelected its ailing and elderly president in a landslide on April 17. Abdelaziz Bouteflika, known as Boutef for short, garnered 82 percent of the vote in a virtually uncontested race. Ali Benflis, who came second with 12 percent, decried massive fraud—possibly including an official turnout of 52 percent, high considering the numerous calls for a boycott.

It remains to be seen whether continuity will mean stability for Algeria. There are reasons to fear the opposite may be true—notably, rising inter-tribal violence, smoldering discontent among the young, and the terrorist threat.

Late last year, violence broke out in the northern Sahara city of Ghardaia (400,000 pop.). It pitted Arabs against Berbers and has already left at least 10 dead and more than 400 injured. At least 700 shops and houses have been torched, and additional police have been called in to restore calm.

The trouble began when the mausoleum of a Berber patriarch was destroyed at the end of December, sparking riots in Ghardaia, three-quarters of whose inhabitants are Mozabite Berbers. The situation remains tense, despite the two communities’ 11-century history of living together in peace. The Mozabites have always been autonomous, going about their business without involvement from Algiers. The fear at this point is that the violence could spread to the strategic region near the big oil fields and not far from Algeria’s borders with its Sahel neighbors.

Making matters worse, in a separate incident, the central government responded crudely to peaceful demonstrations in Tizi Ouzou, in Kabylia, near the Mediterranean coast, to commemorate the “Berber Spring” of 1980. For the first time, the police banned the annual demonstrations, and violence ensued. Pictures of policemen beating demonstrators have sparked outrage and are antagonizing the Berber community.

It looks like Bouteflika is losing control of Algeria’s various communities, and if the situation deteriorates, it could potentially sink him.

So could pent-up anger among Algerian youth, whose poor prospects stir a sense of humiliation and cynicism about the country’s fossilized system. The statistics are dreary: Half a million young people leave school without a diploma every year. One-third of the population is below 30; half of these young people are unemployed, and the other half make an average of $235 a month.

Many young people respond by emigrating to Europe in search of opportunity. Some commit suicide. Yet the regime ignores the youth issue; no young person moves in political leadership circles. There is anger, moreover, among all classes about how the country is being run. So measures to dampen the discontent of different groups by doling out government benefits have been put in place: housing subsidies; increases in pensions, teachers’ wages, unemployment benefits, and farmers’ benefits; subsidies for grain, water, milk, electricity, and gas.

Another, more unusual set of measures has also been adopted: bonuses ranging from $125 to $440 for policemen whose children pass the baccalaureate exam, for instance, and $1,850 bonuses for newlywed couples. These outlays have cost over $600 billion since Bouteflika came to power in 1999. Try though the authorities might to buy off discontent, it seems likely the powder keg will explode sooner or later. And the country’s leaders must know it. Algeria’s foreign currency reserves are rapidly dwindling. Fear of repression by the army may not keep the streets quiet forever.

Indeed, the antiregime propaganda coming from Al Qaeda in the Islamic Maghreb (AQIM) does not fall on deaf ears. In an hour-long video clip, AQIM denounces the corrupt Bouteflika administration and underlines the country’s political, social, and economic problems. The video stresses the collusion of the regime with its Western allies, especially France, which it says is killing Muslims in Mali. Some discontented youths are buying this narrative and falling easy prey to AQIM recruiters. Also, thanks to its very successful “business model,” AQIM is wealthy: Reuters estimates that it has garnered at least $150 million through kidnapping for ransom in the past 10 years, and it profits handsomely from smuggling and trafficking in drugs, arms, and human beings.

Because of Algeria’s porous borders with Mali, Tunisia, and Libya, AQIM and its affiliates transit easily and pull off attacks around the region. Making matters even easier for terrorists, Algiers refuses to cooperate with its neighbors and accepts no external involvement in its management of terrorism. Also, the fact that the Algerian military maintains thousands of troops on the border with Morocco, with which it is waging a longstanding undercover war, limits its effectiveness in other areas.

Even so, the Algerian Army remains by far the best in the region, well equipped and well trained; its budget is higher, for instance, than that of more populous nations like Pakistan and Iran.

What remains most trouble-some is AQIM’s ability to attack strategic targets like the gas facility at In Amenas, which it struck in January 2013, killing 39 foreigners and an Algerian security guard. It seems likely that lessons were not learned and a repeat could occur anytime. Just a few days after Bouteflika’s reelection, AQIM proved how formidable an adversary it is by killing 11 soldiers in Tizi Ouzou. Even though the Algerian Army has killed 37 terrorists so far this year, there is no reason to believe that the threat from AQIM is going away anytime soon.

As for the United States, the visit of Secretary of State John Kerry just a few weeks before the Algerian election demonstrated that what counts for the West is stability. While Algeria is not generally big on international cooperation, its special forces, according to Le Figaro, have joined recently with U.S. Special Forces to fight AQIM elements in southern Libya.

Algeria has so far avoided an Arab Spring, but the Soviet-style presidential election of April 17 could be the last straw for many. Though the civilian opposition is disorganized, any spontaneous outbreak of disorder, coming on top of the Berber issue and the depredations of AQIM, might be too much for the 77-year-old Bouteflika—or anyone else, for that matter—to handle. Algeria, which endured a brutal civil war from 1991 to 2002 and a bloody war for independence in the 1950s and early ’60s, has known chaos before.