The longest-serving intelligence chief in the world, Mohammad Mediene (also known as Tewfiq), was fired today by Algeria’s president, Abdelaziz Bouteflika. The dismissal suggests the hidden power structure in Algiers, called ‘le pouvoir’ by Algerians, is in some murky turmoil.

Mediene was trained in the Soviet Union by the KGB. He grew to power in the dark days of the late 1980s, as Algeria experienced an Islamic election victory followed by an army coup and then a bloody civil war. In 1990, Mediene became head of the Department of Intelligence and Security (DRS), and waged a violent and ugly war against Algeria’s Islamists. The struggle consumed the country in horrific violence, but Mediene prevailed. He was rarely photographed and never appeared in public, but he was called ‘the Lord of Algeria.’

Algeria is Africa’s largest country and has the largest military in the continent. The generals run the country behind a facade of elected government. Tewfiq was their enforcer, the man who knew everything about everybody.

Bouteflika has been maneuvering to oust the spy chief for the last few years. Athmane Tartag, the former number two in the DRS and a Bouteflika man, was brought back to replace the man also called ‘the butcher of Algiers.’ Of course Bouteflika, at age 78 and in his fourth term as president, is no radical reformer. He is a product of Algeria’s stultified politics. Mediene’s removal is not a sign of change — only a sign the regime faces tough problems.

Algeria largely escaped the Arab Spring due to bitter memories of the 1990s civil war and high oil prices that kept its welfare state operating. It has a huge underemployment problem, youth bulge, and all the other ingredients for revolution. As memories of the brutality of the 90s fade among its youth, it is a candidate for unrest. With oil prices low and likely to go lower still, Algeria will face tough challenges.

Al Qaida in the Islamic Maghreb and its spin-off group headed by Mohktar Belmohktar have fought a low-energy war against the generals for a decade. The jihadists don’t pose a threat to the regime, but they are waiting in the wings for the economy to produce a riper context for them to work in. Their nemesis will not be there now.