September 2010 is the 20th anniversary of the world's longest serving 'intelligence chief' taking office. The man in question is General Mohamed 'Toufik' Mediène, the director of Algeria's Département du Renseignement et de la Sécurité (DRS).
He was appointed head of the DRS in September 1990, 15 months before Algeria's 'Generals', or 'the group' as they were known at the time, which included Mediène (then a colonel), annulled the elections that would have brought to power the world's first ever democratically elected Islamic government.
To serve as head of the intelligence and security service of one of the world's most ruthlessly repressive and corrupt regimes for 20 years is an extraordinary achievement. Felix Dzerzhinsky, the founder of the Cheka and forerunner of the KGB, effectively 'controlled' the Soviet Union for nine years (1917-1926); Lavrenti Beria, head of the NKVD, terrorised it for 15 (1938-1953); Hitler's chief of police, Heinrick Himmler committed suicide after 11 (1934-1945), while General Hendrik van den Bergh ran apartheid South Africa's Bureau of State Security (BOSS) for 11 years (1969-1980). Mediène has surpassed them all.
Why then, just as Mediène has reached this extraordinary milestone, are there rumours of his imminent demise?
The answer, in a nutshell, is that when a country's head of intelligence and security becomes 'the news' it is a fairly sure sign that his time is up. For the last nine months, Mediène has increasingly been 'the news', largely as a result of the struggle that broke out between Abdelaziz Bouteflika and the DRS boss after Bouteflika's election to a third term as president in April 2009.
Algeria's 'strong man'
To understand this struggle, we need to go back some years. Mediène's promotional route had been 'le tapis rouge' - trained by the KGB in 1961 and backed by the chiefs of Algeria's original secret service.
During the 1990s, when Algeria was immersed in its 'Dirty War' against the Islamists, the strongest man in the country was General Mohamed Lamari, the chief of staff of the Algerian army. However, as the country moved towards peace and the tanks returned to barracks, this mantle shifted to Mediène.
The transition from 'war' to 'peace' and the emergence of Mediène as the country's 'strong man' coincided with the period surrounding the election in 1999 of Bouteflika as president.
The personal weaknesses of others, such as the propensity to corruption and sexual proclivities, have been fundamental to Mediène's exercise of control. It is therefore not surprising that Mediène's support for Bouteflika in 1999 was clinched by the fact that Bouteflika had been convicted in 1983 for the embezzlement of some $23mn in today's equivalent from Algeria's chancelleries while serving as foreign minister from 1965 to 1978.
Mediène became Algeria's undisputed 'strong man' after the April 2004 presidential election and the unexpected dismissal of Mohamed Lamari four months later. The intrigue that led to Lamari's dismissal involved a deal between Bouteflika and Mediène to give Algeria a new image by removing the most hated general of that time.
With Lamari gone, power was effectively shared between Bouteflika and Mediène, with General Smaïn Lamari (no relation to Mohamed), Mediène's deputy and head of the Direction du contre-espionnage (DCE), doing his 'dirty work'.
Mediène is a very secretive man. Only one photograph of him has been published and few, if any, of his spoken words have been recorded. It has therefore been assumed that the realisation of his ambition, if that is what it was, to take effective control of the country, dates from Lamari's departure from the scene.
However, there is one record of Mediène's words which suggests that he had a grandiose sense of his self-importance and power long before Lamari's 'retirement'.
The year was 1999; the occasion was the DRS's torture and interrogation of Fouad Boulemia, claimed by the DRS to have murdered the Islamic Salvation Front (FIS) leader Abdelkader Hachani.
In his controversial one-day court trial in April 2001, Boulemia described how, after he had been tortured by DRS officers, Mediène entered and said: "It's me, the boss (ana rabha). You are going to see what I am going to do to you. Admit that you killed Hachani and you'll get 15 years prison. Your parents will be able to see you in prison. If not, I'm going to take you to your mother's and will disembowel her in front of you. I am General Toufik, the God of Algeria (Rab Edzayer)."
Aside from his power of life or death over his fellow mortals, Mediène's other godly attributes, given his shareholdings and investments in Algeria's natural resources and real estate, would appear to be more materialistic than spiritual.
The 'God of Algeria's' current difficulties began with Bouteflika's election to a third term in April 2009. A third presidential term required a change to the constitution, which the DRS reluctantly supported.
But the consequences of the election were not what Mediène had intended. No sooner was Bouteflika ensconced in his third term than his 'clan' as it become known, aware of the president's poor health, started planning in earnest for the succession of his younger brother, Said Bouteflika.
Although regarded by many as ineffectual, Said Bouteflika was nevertheless establishing a political power base. He had become the president's 'gate-keeper', was effectively a minister-without-portfolio and was gathering support among the country's business elite. There was even talk of a new political party being created for him.
The prospect of such a dynastic succession was not what the DRS had in mind when it gave the green light for Bouteflika's third term.
Mediène watched Said's move towards centre stage with distaste. Although the DRS no doubt felt that it could manage the 'succession problem', Mediène was alert to the possibility that Bouteflika, having got rid of Lamari at the beginning of his second term, might try to do the same with Mediène in his third.
The warning signal to Mediène came when Said Bouteflika linked his campaign to the former security boss, General Mohamed Betchine.
Corruption as control
Betchine had been head of the country's intelligence services and Mediène's boss in the 1980s, before the creation of the DRS in 1990, when he seemingly went into retirement.
Following their January 1992 coup, the Generals ruled for the next two years through the Haut Comité d'Etat (HCE). With the HCE's dissolution in January 1994, the Generals appointed their own man, Liamine Zeroual, as president.
Determined not to be the generals' stooge, Zeroual appointed Generals Saidi Fodil and Mohamed Betchine as his two advisors.
By 1996, Zeroual had decided that Mediène had become too powerful and planned to replace him with Fodil. Mediène's response was swift: Fodil died in a 'road accident'.
A year later, Zeroual tried again, this time deciding to appoint Betchine as minister of defence in order to get rid of Mediène. Mediène's retaliation was again swift and preemptory. He organised civilian massacres on a massive scale - at Raïs, Bentalha, Beni-Messous and elsewhere - bringing horror and psychosis to the gates of Algiers. At the same time, he set the DRS machinery on destroying Betchine's businesses and reputation, forcing him to resign - a broken man. Zeroual followed suite.
Mediène's response to the prospect of Betchine being brought back to power by a Said Bouteflika succession has been devastating. His strategy has been to destroy all those linked to Said Bouteflika using the age-old combination of 'corruption' and 'blackmail'. Indeed, one reason why Mediène backed Bouteflika in 1999 and why corruption has become so pervasive over the last 10 years is that the DRS has encouraged it and uses it as a form of control.
Mediène began by exposing the corruption involved in the $12bn E-W highway project, the department of public work and its minister, Amar Ghoul, a friend of Said Bouteflika. The warning was not heeded. Mediène's attack, reminiscent of his 'destruction' of Betchine in 1998, was therefore ratcheted up and directed at both Sonatrach, the giant state-owned oil and gas conglomerate and source of 98 per cent of Algeria's foreign exchange, and Chakib Khelil, the minister of energy and mines and a close friend of the president and 'symbol' of the Bouteflika era.
The 'Sonatrach scandal', which broke in January 2010 with the arrest of the company's CEO, four of its five vice-presidents and other senior executives soon brought both the economy and government to a state of near paralysis. Bouteflika was scarcely seen in public, while the DRS-led witch-hunt, ostensibly into Sonatrach's corruption, left few within the country's political and business elites without sleepless nights.
At one point, it looked as if Bouteflika might be turning the tables on Mediène by establishing an 'independent security commission' to investigate certain dossiers that had remained unresolved from earlier eras.
In particular, the commission sought to ascertain the role played by the DRS in the assassinations of Mohamed Boudiaf, the first chairman of the HCE, and Saidi Fodil.
The testimonies of two high-ranking witnesses, one a member of the DRS's special unit involved in the assassinations of both Boudiaf and Fodil and the other a high-ranking army officer who confirmed the existence of this secret DRS unit, confirmed that this unit, under the overall command of Generals Mediène and Smaïn Lamari, had arranged Fodil's car 'accident'.
We will probably never know what dark arts were exercised on Bouteflika after the publication of these testimonies, but suffice it to say that nothing more has been heard of the commission.
Bouteflika's May 2010 ministerial reshuffle had Mediène's victory script written all over it. Chakib Khelil and Interior Minister Nouredinne 'Yazid' Zerhouni, Bouteflika's two main ministerial supports, were dismissed, along with several lesser ministers. Said Bouteflika's proposed succession became history.
The fact that Mediène has succeeded in reducing Bouteflika's third term of office to a 'lame-duck' presidency may give him personal satisfaction, but it is something of a Pyrrhic victory for at least two reasons.
Firstly, the Sonatrach scandal and its associated exposés have been at incalculable cost to Algeria's economy and international reputation. Secondly, a number of other unexpected revelations in the last couple of months have caused particularly unwelcome problems for Mediène.
These stem mostly from the recent Quds Press interviews with former DRS agent Karim Moulay. Moulay not only reminded Algerians and the world of the involvement of Algeria's security services in the massacres of the 1990s, but, worse still for Mediène, Moulay gave public testimony that Mediène himself not only ordered the Beni Messous massacre of September 5, 1997, in which some 200 residents of the shack community were slaughtered, but that it was a 'real estate' land clearance operation for his family's personal gain.
Moulay also said that the DRS, under Mediène's command, was behind the planning and execution of the 'terrorist' attack on the Asni Hotel in Marrakech, Morocco, that killed two Spanish tourists and wounded a third in August 1994. Whether Spain re-opens the file and how Morocco will react remain to be seen.
Algeria's relations with Morocco are likely to be damaged further by the activities of al-Qaeda in the Islamic Maghreb (AQIM). Morocco is aware of the involvement of the DRS in establishing AQIM in the Sahara-Sahel. Now that the kidnapper of the three Spanish aid workers abducted in Mauritania last November, Omar Ahmed Ould Sidi Ould Hama, has been revealed as a member of Polisario, which is closely managed by the DRS, Morocco's claims that the Polisario is being used by Algeria, or at least the DRS, for 'terrorist' objectives, is suddenly taking on a new light.
Moreover, the increasing number of articles indicating that AQIM in the Sahel was a DRS creation is causing unease in Washington. Again, the blame lies with Mediène.
On the domestic front, it is believed that the DRS is coming under pressure, possibly from elements within the army and its own ranks, for the fact that 'terrorism' in the north may be getting worse, not better as claimed by the government, and that civil unrest across the country is reaching alarming levels.
Rumours are that third party intermediaries have spoken with both Mediène and Bouteflika and reached a deal whereby Mediène will 'retire' followed a while later by Bouteflika on grounds of ill-health, with the country to be ruled until the 2014 elections by a deputy president(s) to be appointed sometime before Bouteflika's departure.
Algeria lives by rumour, and this rumour is not dissimilar to one in the spring of 2001 which said that the Berber unrest would bring Mediène's career to an end.
But in 2001 Mediène was saved by 9/11 - twice. Firstly, he was spared being killed on 9/11 by being in another part of the Pentagon building on that fateful day. Secondly, he immediately became Washington's key ally in its 'global war on terror'.
It is unlikely that Washington will attempt to save him now. After all, it is thanks largely to DRS errors that we have been able to tell the story of how the Sahara-Sahel front in the 'global war on terror' was a US-Algerian fabrication.
Jeremy Keenan is a professorial research associate at the School of Oriental and African Studies, London University, and author of The Dark Sahara: America's War on Terror in Africa.
The views expressed in this article are the author's own and do not necessarily reflect Al Jazeera's editorial policy.