The Taliban have boasted that Nato forces are leaving Afghanistan in "humiliation and disgrace" in a statement to mark the 11th anniversary of the start of the international military campaign.

The insurgent movement taunted that coalition countries were competing to pull out early from the unpopular war, after a series of nations have this year announced a speeded up withdrawal.

But David Cameron insisted plans to train a capable Afghan army and police force to take control when foreign combat forces leave at the end of 2014 remained “on track”.

The international campaign in Afghanistan started on October 7, 2001, when America and Britain began airstrikes to topple the Taliban regime for harbouring Osama bin Laden.

Though the Taliban regime fell within weeks, the insurgency that followed has since become America’s longest war. It has seen more than 3,000 coalition troops die, including 433 British, and many thousand more Afghan civilians, police and soldiers.

Afghan and international troops have managed to improve security in parts of the country, but violence remains widespread and the gains are uncertain. Diplomats lament that Hamid Karzai’s government is still weak and riddled with corruption.

The coalition has agreed to hand over control to Afghan forces by the end of 2014 and leave only a small special forces and training deployment behind.

Nations including France and New Zealand have this year announced earlier withdrawals in the face of continuing casualties and domestic opposition to the war.

The Taliban statement said “morale-lacking invaders are competing ignominiously with each other in turning tail from Afghanistan”.

Britain currently has 9,500 troops in Afghanistan, with 500 scheduled to leave by the end of the year.

Mr Cameron said he was “absolutely” committed to the handover in 2014 and the pace of British troop withdrawal was being decided.

He told the BBC: “The key question now is, between where we are now in 2012 with 9,000 soldiers and where we need to be at the end of 2014, what is the pace of handing over to the Afghan army?”

“That is being discussed and I am sure we can come up with a sensible set of steps to see those numbers reduced.”

Mr Cameron added: “I think the plain truth is we are actually on track to achieve an Afghan army and police that are capable of doing the job that we are doing now.

“We are not going to leave behind some perfect country with some perfect government, but I think we can leave behind an Afghanistan that is strong enough to stop it once again becoming a haven of terror.”