By Lamine Chikhi

ALGIERS (Reuters) - Algerian President Abdelaziz Bouteflika has dissolved the long-standing military spy directorate known as the DRS, creating a new agency under the control of the presidency in another step to ease the military out of politics, security sources said.

Bouteflika, rarely been seen in public since he suffered a stroke in 2013, began curbing the military's influence before his re-election in April 2014, in what analysts said was preparation for his eventual departure after more than 15 years in power.

But the decree to shut the Department of Intelligence and Security, or DRS by its French initials, and replace it with the Direction of Security Services is a significant move to restructure the intelligence apparatus.

Despite presidential elections, analysts say, Algeria's politics has long been dominated by the ruling FLN party elites and the military, who engage in backroom manoeuvring for political influence in the North African OPEC state.

Bouteflika last year removed Mohamed Mediene, the DRS for more than two decades, sidelining someone who had been a major figure in past behind-the-scenes power struggles.

Mediene, one of whose nicknames was the "King of Algeria", had long played the role of political kingmaker, analysts said, influencing leadership choices in backroom tussles between civilian and military factions even while trying to maintain stability among them.

The decision to dissolve the DRS has yet to be published in the official gazette. But security sources familiar with the decision said General Athmane Tartag, a retired DRS chief, will led the new intelligence agency from his office at the presidency.

Since Algeria's 1962 independence from France, the military has long played a role in politics. But during the country's 1990s war with Islamist fighters, the DRS extended its sway over political parties, media and economy in the name of security.

For the past two years, Bouteflika had already moved to steadily ease the DRS out of civilian interests, retiring generals and restructuring parts of the military, transferring DRS roles to army officials seen as loyal to the presidency.

Story continues

"The move will enable Algeria's intelligence to move from a 'secret police' to a more proper intelligence agency to adapt to ongoing regional and domestic political transition," security analyst Arslan Chikhaoui told Reuters.

The Defence Ministry will no longer supervise the new intelligence agency, as it will be under the authority of the president's office. "The era of kingmakers is officially over now," a senior member of the ruling FLN party told Reuters.

Algeria is a pivotal partner in the Western-led campaign against Islamic militancy in North Africa and the Sahel region. But Libya's chaos next door, the rise of Islamic State in the region and instability in Mali are major concerns.

Shifts in the security service come amid opposition speculation on whether Bouteflika will finish his term and while the government faces 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.

(Writing by Patrick Markey)