The UK need not conduct a Chilcot-style full public inquiry into its Afghanistan mission because the campaign was a just war, the head of the Armed Forces has said.

Gen Sir Nick Carter said the two-decade intervention did not face the same controversy as the Iraq War and did not require the same kind of long and costly public investigation.

The Chief of the Defence Staff also said that while the Taliban was winning the propaganda war following the US and Nato withdrawal of troops, the insurgents were overstretched by their recent gains. He predicted that if the Afghan government remained united it could hold the country’s major cities against the militants.

Sir Nick’s comments came after calls for a public inquiry into the campaign, which cost billions of pounds and the deaths of 457 British soldiers, sailors and airmen.

Sir John Chilcot’s seven-year inquiry heard from 150 witnesses and looked at thousands of documents as it probed Tony Blair’s decision to go to war in Iraq, as well as whether troops were prepared and how the aftermath was handled.

His 12-volume report tore into the planning, preparation and resourcing of the military campaign that left 179 personnel dead, and declared that it ended "a very long way from success".

Earlier this month, Lord Dannatt, a former Chief of the General Staff, said that now British troops had departed from Afghanistan "the real audit must begin and a public inquiry along the lines of Chilcot’s into Iraq must be initiated".

Tobias Ellwood, the chairman of the Commons defence committee, has also called for a "a Chilcot-style inquiry so that we can learn the lessons of what went wrong".

But Sir Nick told The Telegraph: "One has to remember why we had a Chilcot inquiry. As I recall, it was because there were some big questions raised about the justness of the war in Iraq. I don’t think anybody is questioning the true justness of the war in Afghanistan."

He said the military campaign had been backed by a United Nations Security Council resolution and Nato members had invoked the alliance’s mutual defence pact after the 9/11 attacks.

"It was very clear why the international community went to Afghanistan to do what it did and nobody has questioned that," he said. "So I think we need to put in perspective the reason why we might have a public inquiry and I don’t think anybody would criticise the decision for people to be involved in Afghanistan."

Sir Nick added that while there were "lots of good lessons that can be learned from the way the campaign was conducted… I am not sure that necessarily needs to be done as a public and probably very expensive inquiry. Rather I think it should be a sensible, transparent exercise conducted within government".

The Taliban has swept the Afghan government from dozens of rural districts in the two months since Joe Biden announced the endgame of his troop withdrawal. Sir Nick, who served for a total of nearly three years in the country, said the militants had overextended and Afghan forces had consolidated.

He added: "If Kabul stands together in a united fashion and if can they manage to supply the Afghan army and sustain it so they can retain the key provincial capitals, then I don’t think that the rag tag and bobtail effort that is the Taliban insurgency is likely to be able to achieve its effect."