KABUL (Reuters) - Afghan President Ashraf Ghani named two former heads of the intelligence services to key security posts in his government on Sunday in a step that could affect both next year’s presidential election and moves toward peace with the Taliban.

Afghanistan's President Ashraf Ghani attends a two-day conference on Afghanistan at the United Nations in Geneva, Switzerland, November 27, 2018. REUTERS/Denis Balibouse/File Photo

Asadullah Khalid, who suffered horrific injuries in a Taliban suicide attack shortly after taking over the National Directorate for Security in 2012, was named as acting defense minister. Amrullah Saleh, who served as NDS chief until 2008, was appointed acting interior minister.

Both men, veterans of decades of conflict in Afghanistan, have been uncompromising opponents of the Taliban and of Pakistan, which they accuse of supporting the insurgency, but both have also been at times strongly critical of Ghani.

The appointments come at a critical time, with elections due in April and talks between U.S. special envoy Zalmay Khalilzad and Taliban representatives over a possible peace deal expected to continue in January following three meetings this year.

Ghani is expected to run for a second five-year term, and the future of U.S. involvement in Afghanistan is unclear following Khalilzad’s meetings and last week’s surprise U.S. announcement of plans to withdraw almost half of its forces.

The appointments have fueled accusations that Ghani, sidelined from the talks by the Taliban’s refusal to deal with his government, was trying to neutralize potential opponents by bringing them onto his side ahead of the election.

Afghan politics, lacking strong political parties, is dominated by ethnic loyalties, personal alliances and often unstable coalitions between powerful regional leaders.

Ghani, an ethnic Pashtun like almost all Afghan heads of state, has no strong local power base of his own but has been adroit at building alliances with regional strongmen who have exchanged their support for influence in national politics.

Both Khalid, a Pashtun who founded his own political movement this year, and Saleh, an influential figure in the ethnic Tajik political world, had been expected to be on opposing sides to Ghani in the election.

But their unrelenting hostility to the Taliban and Pakistan may complicate efforts to reach a peaceful settlement to end 17 years of war in Afghanistan.

“It hurts the whole peace process and makes it difficult to convince the Taliban to negotiate with the government,” said one senior government official, who spoke on condition of anonymity.

Khalid, who recovered from his wounds after two years in the Walter Reed National Military Medical Center outside Washington, has faced strong criticism from human rights groups over allegations of torture and running private prisons, which he denies.

When he was nominated as head of the NDS in 2012, Amnesty International said there were numerous reports he was involved in torture and unlawful killings, particularly while serving as provincial governor in Kandahar and Ghazni.

Saleh, who started his career as intelligence chief for the former anti-Soviet Mujahideen commander Ahmad Shah Massoud, served as head of the NDS under former President Hamid Karzai.