US President Barack Obama has announced plans to leave 9,800 US troops in Afghanistan at the start of next year, down from about 32,000 now.

By the end of 2015, that US presence would be reduced by about half.

The US said it believes that Afghanistan has time to develop a reliable counter-terrorism force before the end of 2016, when US troops are due to withdraw under plans announced yesterday.

The forces, focused on advising Afghans and counter-terrorism assistance, would gradually shrink to a smaller embassy presence by the end of 2016.

General Martin Dempsey, chairman of the US Joint Chiefs of Staff, said Pakistan and Afghan military chiefs had expressed appreciation and relief at the decision to keep thousands of US forces in the country in 2015 and into 2016, ending months of uncertainty.

"The Afghan chief of defence, when I told him of the decision ... immediately said: 'Thank God'," Gen Dempsey said in a telephone interview as he flew to the United Arab Emirates.

He said Afghan army Chief of Staff General Sher Mohammad Karimi said the decision would allow his country to "feel as though we can get about the business of governing ourselves" secure in the knowledge of continued US support.

"My Pakistani counterpart, the first words out his mouth was that he was deeply relieved. He too felt that the certainty was important, not only for Afghanistan but for the region," Gen Dempsey said, referring to Pakistan's General Rashad Mahmood.

Mr Obama's announcement prompted criticism from Republicans that the hard-fought gains made against the Taliban could be lost in much the same way that sectarian violence returned to Iraq after the US withdrawal.

But Gen Dempsey said he believed the message that the US was heading to a normalisation of relations with Afghanistan would "resonate quite favourably both in Afghanistan and regionally".

"The notion of an enduring commitment but also that we don't intend to be ... in the day-to-day lives of Afghans the way that we have been in the past - I think that actually will resonate quite positively," Gen Dempsey said.

Mr Obama made a surprise visit to US troops in Afghanistan at the weekend.