Algiers: Algeria’s President Abdul Aziz Bouteflika has replaced the long-standing head of the country’s military intelligence agency, in his latest move to curb the spy chief’s influence in politics, two security sources and state media said on Sunday.

Mohammad Mediene, chief of the DRS intelligence service, had long played the role of political kingmaker, analysts said, by seeking to influence leadership choices in Algeria’s behind-the-scenes power struggles.

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, also known as Toufiq, has been replaced by General Athmane Tartaq, a specialist in fighting against armed groups who also served as Bouteflika’s security advisor, the two sources and APS state media said.

APS confirmed the replacement citing a statement from the presidency.

Changes in the security apparatus are closely watched in Algeria, a key 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.