Image copyright AFP Image caption About 9,800 US troops remain in Afghanistan

The Afghan government has welcomed the US's decision to extend its military presence in Afghanistan beyond 2016.

The move would help "stability" in Afghanistan, the government said in a statement, while vowing to "respond to fear and terror with full force".

The US said on Thursday it would maintain 5,500 troops in Afghanistan into early 2017 - a shift from earlier plans to withdraw most by late 2016.

The Taliban has vowed to continue attacks on US troops to force them out.

There are currently 9,800 US troops stationed in Afghanistan, providing training and conducting counter-terrorism operations.

The US originally planned to withdraw all but a small embassy-based force of 1,000 troops by the end of 2016.

However, US President Barack Obama announced on Thursday that he would maintain current troop numbers for most of 2016, with 5,500 still in Afghanistan when he left office in 2017.

Read more on Afghanistan:

Media playback is unsupported on your device Media caption President Obama: "This modest but meaningful extension of our presence... can make a real difference"

He described the policy shift as "the right thing to do", adding that the ending of Nato combat operations in December last year had come at a price, with many Afghan troops and civilians killed since the Taliban stepped up its insurgency.

The Afghan government said the move showed the "renewal of the partnership" between the two countries, and vowed to step up its anti-terror efforts.

It added that it remained open to the prospect of peace talks with the Taliban.

Meanwhile, Afghan politician Shukria Barakzai told the BBC's Newsday that "more troops, more aid, more co-operation... can be the only way that we can survive [in] Afghanistan."

Image copyright Reuters Image caption The Taliban had briefly seized the city of Kunduz before they were repelled by Afghan troops

The Taliban said it a statement that the US extension would not stop the militant group's "speedy progress", and said attacks on US troops would increase, forcing the US to reverse its "cruel strategy".

Last week, the top US military commander in Afghanistan, Gen John Campbell, described the security situation as "tenuous" and said an enhanced military presence would be necessary if the Taliban were to be repelled.

He was speaking days after the Taliban briefly seized the northern city of Kunduz - their most significant military gain since being ousted from power in 2001.

After the Taliban's surprise attack on Kunduz, Afghan government forces managed to retake control of key areas of the city with the aid of Nato special forces and US air strikes.

But the city's brief capture was seen as a setback for the Afghan authorities, under pressure to show they can keep the country secure without the backing of international forces.

The south-eastern city of Ghazni has also seen fierce clashes between Taliban insurgents and US-trained Afghan troops in recent days.