Image copyright AFP Image caption An estimated 10,000 Taliban prisoners are being held in Afghan jails

Afghan President Ashraf Ghani says his government has not pledged to free Taliban prisoners, as stated in a deal reached by the US and the militants.

Under the landmark agreement signed on Saturday in Qatar, 5,000 Taliban would be released in exchange for up to 1,000 government detainees by 10 March.

Mr Ghani said such a prisoner release "cannot be a prerequisite for talks", but must be part of negotiations.

The US-Taliban agreement includes a phased withdrawal of US troops.

In return, the hard-line Islamist group agreed to hold peace talks with the Afghan government.

The deal also commits the Taliban to prevent al-Qaeda and all other extremist groups from operating in the areas they control.

Media playback is unsupported on your device Media caption Afghanistan's National Security Advisor, Hamdullah Mohib, says women have an ally in the president

The US invaded Afghanistan weeks after the September 2001 attacks in New York by al-Qaeda, then based in Afghanistan. The Taliban were ousted from power but became an insurgent force that by 2018 was active in more than two-thirds of the country.

What did Ghani say?

Less than 24 hours after the deal was signed in Doha, the Afghan president told reporters in Kabul: "The reduction in violence will continue with a goal to reach a full ceasefire."

But he added: "There is no commitment to releasing 5,000 prisoners.

"This is the right and the self-will of the people of Afghanistan. It could be included in the agenda of the intra-Afghan talks, but cannot be a prerequisite for talks."

Any prisoner release, he added, was "not in the authority of the US" but "in the authority of the Afghan government".

An estimated 10,000 captured Taliban are being held in Afghanistan.

Media playback is unsupported on your device Media caption Tens of thousands of Afghan soldiers have been killed and injured. This is their story

Bumpy road

Secunder Kermani, Pakistan & Afghanistan correspondent

What happens to the Taliban prisoners in Afghan jails was always going to be a tricky issue. For the insurgents, having them released is a key goal. The Afghan government, however, knows that, and is reluctant to play the card too early - without extracting any concession in return.

As one Afghan official put it to me: "They want their prisoners, we want a ceasefire."

The confusion over their fate stems in part from a difference in language between a statement released by the US on Saturday in Kabul, and the US-Taliban agreement.

The deal reached in Doha states that the US will "work with all relevant sides on a plan to expeditiously release" prisoners, before adding that the release will happen by the 10th March start of "intra-Afghan talks".

However, the US-Afghan joint declaration released on the same day simply says the US will facilitate between the government and Taliban on the "feasibility" of prisoner release.

What does the deal mean for the US?

More than 2,400 American troops have been killed during the conflict. About 12,000 are still stationed in the country.

The US and its Nato allies have agreed to withdraw all troops within 14 months if the militants uphold the deal.

US President Donald Trump, who had promised to end the Afghan conflict, said on Saturday that it was "time to bring our people back home".

Media playback is unsupported on your device Media caption Trump: "It's been a hard journey for everybody"

Mr Trump said 5,000 US troops would leave Afghanistan by May and he would meet Taliban leaders in the near future.

He added that US troops had been killing militants in Afghanistan "by the thousands" and now it was "time for someone else to do that work and it will be the Taliban and it could be surrounding countries".

On Sunday, US Secretary of State Mike Pompeo told CBS news that he hoped negotiations between the Afghan government and the Taliban would begin in the coming days.

He said Mr Trump would be "actively engaged" in any talks.

Nearly 3,500 members of the international coalition forces have died in Afghanistan since the 2001 invasion.

The figures for Afghan civilians, militants and government forces are more difficult to quantify. In a February 2019 report, the UN said that more than 32,000 civilians had died.

The Watson Institute at Brown University says 58,000 security personnel and 42,000 opposition combatants have been killed.