In an interview with the Guardian, Lieutenant General James Bucknall said the UK had made "an investment in blood" and that now was not the time for western nations to turn their back on the country.
He claimed that the Taliban had been pushed back everywhere and that relentless special forces operations are killing 130 to140 insurgent leaders every month.
He conceded that too often over the last decade the military had "over-promised and under-delivered".
Bucknall said he understood why politicians, the public and the armed forces themselves felt war-weary. Mistakes, he admitted, had been made.
"We almost owe it to those who have gone before to see the job through," he said. "Having made this investment in blood, I am more determined. If I didn't think we could do this I would take a very different view but I am confident we can do it."
Bucknall's comments come on the eve of an international conference in Bonn to discuss the future of Afghanistan. There is mounting concern about the amount of aid that Afghanistan will receive and a growing political clamour in the US and UK for western forces to speed up their withdrawal. But Bucknall said critics of the military campaign should ask whether the Taliban leader Mullah Omar had been able to achieve any of his goals over the last two years.
"Let's mark [his] work. If he was serious about overthrowing the government and grabbing a portion of Afghanistan for his own, you have to do three things. You have to secure your own heartland in Kandahar and central Helmand. Is he doing that? No. They lost their safe havens around Kandahar in 2010 and they didn't take them back in 2011. They are not holding their own heartland.
"Secondly, you have to spread your influence around other areas. There is absolutely no evidence anywhere in Afghanistan that they are doing that. Thirdly, you have got to affect the seat of government. There have been lots of headlines, but Kabul has about 20% of the population and less than 1% of total violence in the country. Not only is the seat of government unaffected, but Kabul is a flourishing capital city that is much safer than Karachi."
The Taliban had been reduced to a terrorist group, adopting terrorist tactics, said Bucknall.
"I have not seen any insurgents who have assassinated their way to power. One hundred and forty [Afghans] have been assassinated this year. In the press that is painted as the government cannot survive this. But we are taking out 130-140 mid-level Taliban leaders every month. Sometimes it is worth turning the egg-timer on its head. They have been driven to this much vaunted tactic of assassinations."
He said that the idea the Taliban would sit and wait until western forces had left suited Nato well because it would allow Afghan police and army more time to get up to strength.
Bucknall has just finished an 18-month tour in Kabul, during which he was in charge of all British forces, and second in command of the International Security and Assistance Force – the military coalition now commanded by the American general, John Allen.
Bucknall oversaw the "surge" last year in which an extra 30,000 American troops began an offensive to push back the insurgency – a tactic that reduced attacks in some areas, but raised questions about whether progress could be sustained by Afghan police and army when Nato forces began to pull out.
The west has said none of its forces will be fighting after 2014.Bucknall admitted that Afghanistan's security was still fragile and expressed frustration that certain factors that would determine Afghanistan's future – such as diplomatic efforts to bring the Taliban to the negotiating table – were out of the military's control.
The western coalition had to stick together over the next two years during the pull-out – a coded warning to countries that might want to "run for the exit door". Pakistan had to be "part of the solution in one way or another", said Bucknall.
"These are the two top ingredients. We have to stick together. We went in together, and we go out together. Managing a coalition in a draw down requires an awful lot more work than managing a coalition during a surge."