Image copyright AFP Image caption Afghan security forces on an operation near the Pakistani border on Saturday

Afghan President Ashraf Ghani has said America's two-year deadline for pulling out the last of its troops may need to be "re-examined".

US President Barack Obama is committed to withdrawing all US soldiers by the end of 2016, as Afghanistan looks after its own security.

But Taliban militants stepped up attacks dramatically last year and have declared victory over the US.

Mr Ghani told US broadcaster CBS that "deadlines should not be dogmas".

Disagreements over the timetable for the US-led coalition's withdrawal dogged Mr Obama's relations with the new Afghan president's predecessor, Hamid Karzai.

Since the coalition formally ended its peacekeeping mission last month, some 13,000 mainly American soldiers remain in a training and support role, together with a few thousand US soldiers whose focus will be on counter-terrorist operations.

The Taliban declared that the US and its allies had been "defeated" and pledged to pursue a "pure Islamic system by expelling the remaining invading forces".

'No IS here'

At the peak of its 13-year mission, the coalition involved more than 130,000 personnel from 50 countries.

"If both parties, or, in this case, multiple partners, have done their best to achieve the objectives and progress is very real, then there should be willingness to re-examine a deadline," Mr Ghani told the 60 Minutes programme, in an interview to be screened by CBS on Sunday evening.

Asked if Mr Obama had been told, he replied: "President Obama knows me. We don't need to tell each other."

Unlike his predecessor Hamid Karzai, Mr Ghani agreed to a security deal allowing US troops to remain in Afghanistan until the end of 2016.

Both he and his now partner in government, Abdullah Abdullah, have supported the continued involvement of US troops, and had promised to sign the agreement if elected president in the country's recent poll.

Image copyright Reuters Image caption The US-led coalition is packing up: blast barriers stored in a yard at Bagram air base

Image copyright Reuters Image caption Shipping containers awaiting removal from Bagram

Image copyright Reuters Image caption US military vehicles on lorries at Bagram ahead of their transfer to Kuwait

Gen John Campbell, who commands the coalition's remaining forces in Afghanistan, told 60 Minutes separately he was confident Afghan security forces could prevent the country falling into the hands of militant groups like Islamic State in Syria and Iraq.

"With the military they have here... this is not Iraq," he said. "I don't see [IS] coming into Afghanistan like they did into Iraq. The Afghan security forces would not allow that."

The Afghan military, he argued, was now the "number one respected institution in Afghanistan".

"Couple years ago, I probably wouldn't have said that but today it is," he said, speaking in Kabul.

Critics have in the past questioned the morale and discipline of the Afghan security forces in the face of Taliban attack. At least 4,600 of their members were killed last year.

Media playback is unsupported on your device Media caption As Sanjoy Majumder reports, Afghan security forces face a number of challenges

Resolute Support, as the coalition's new training force is known, formally took over on 28 December from the International Security Assistance Force (Isaf).

It will consist of more than 12,500 soldiers and 28 Nato allies, and 14 "partner nations" are due to contribute to its work "in different ways", Nato announced in a news release.