By Lamine Chikhi
ALGIERS (Reuters) - President Abdelaziz Bouteflika on Sunday replaced the long-standing head of Algeria's military intelligence agency, in his latest move in a campaign to curb the spy chief's influence in politics.
The removal of Mohamed Mediene, chief of the DRS intelligence service for more than two decades, sidelines a powerful figure in past behind-the-scenes political power struggles in Algeria.
Known by his nickname Toufik and seldom seen even in photographs, Mediene had long played the role of political kingmaker, analysts said, influencing leadership choices in Algeria's backroom tussles between civilian and military factions within the leadership.
Bouteflika began easing the military and its DRS intelligence wing out of the political sphere before his re-election last April, in what observers said was preparation for his eventual departure after more than 15 years in power.
Mediene was replaced by General Athmane Tartag, a specialist in fighting against armed groups who also served as Bouteflika's security advisor.
"The president of the republic, Abdelaziz Bouteflika has ended the duties of the chief of the Department of Intelligence and Security," a presidential communique said, naming Tartag as his replacement.
It was the culmination of a series of moves to restructure the DRS. This week, the presidency sacked several top generals working under Mediene.
Many of the changes to the DRS have been implemented by Army Chief of Staff Gaed Saleh, deputy defense minister and also a close ally of Bouteflika. Restructuring transferred some DRS duties to the army, leaving the agency to focus on its essential task of collecting intelligence for the armed forces.
"Bouteflika wants a more civilian state with no DRS interference in politics," security analyst Anis Rahmani said. "Mediene's departure, I think, ends the DRS' time as a political tool."
Changes in the security apparatus are closely watched in Algeria, a partner in the Western campaign against Islamist militants since emerging in 2002 from more than a decade of its own conflict during which 200,000 people died.
Bouteflika was re-elected to a fourth term in April last year, but he has rarely been seen in public since recovering from a stroke in 2013, fuelling local media speculation over his ability to serve out his mandate, which ends in 2019.
Shifts in the security service also come while the government facing an economic challenge after a collapse in world oil prices. A major gas supplier to Europe, Algeria relies on energy revenues for 60 percent of its budget. Oil and gas represent 95 percent of its exports.
(Reporting by Lamine Chikhi; Writing by Patrick Markey; Editing by Catherine Evans and William Hardy)