When historians look at the opprobrium heaped on Gordon Brown this year over the conduct of the Afghan war, I think they will be somewhat baffled and conclude that it was one of those you-had-to-have-been-there things. I think that they would struggle to identify what Brown could have done differently or how as a junior partner in the coalition he could have done more to influence the course of events. They might have sympathy with someone who inherited two unravelling war efforts and who has then been painted as a callous monster for not wanting to be railroaded further down the road of neo-colonial adventurism than was absolutely necessary to safeguard the country’s interests.

During the vacuum caused by Obama’s lengthy purdah on the matter, Brown has steered a constructive course through the most difficult months of the war to date. Although lampooned as a ditherer, Brown backed the McChrystal-surge approach in a fraction of the time that it took Obama to gather his thoughts on the subject. Brown also pressed ahead with pledging more troops and seeking similar commitments from NATO allies, all while the UK was one of the few countries waging a ‘hot’ campaign against the enemy. There are many leaders involved in the ‘AfPak’ situation who could be accused of abusing or abdicating their role in the war in the past months, but Brown isn’t one of them.

For all the invective that has been hurled at Brown by his critics over Afghanistan this year, his responses to events have consistently been the most sensible ones on the table. When Karzai’s corruption-tainted presidential victory threatened to derail the mission, Brown struck a careful balance, not complacently waving through the win while not issuing ultimatums that would have tied our hands further down the line. Moreover, I haven’t heard any alternatives to Brown’s plan that do as much to satisfy the conflicting demands of a military anxious for more resources and a public anxious for an exit strategy. Kim Howells has suggested that we should pull out altogether and focus on domestic security. A Brest-Litovsk-style abandonment of our allies is not a realistic option for a power of Britain’s standing and the suggestion strikes me as an exercise in bum-covering because Howells thinks we are going to lose.

At the other end of the spectrum, there have been some disgruntled noises in the military that the only way to win is to commit ourselves to a nation-building role in Afghanistan for decades. This smacks of the kind of unfocussed mission creep that has caused the mission to lose its way and lose support. Having as our ultimate war aim the transfer of security to Afghan forces not only gives us a measurable idea of what success will be but, as Brown has argued, maintains the distinction between a liberating force and an occupying one. Of course, it could unravel horribly. We can’t unmake the war. Someone has to come up with something and there aren’t any better ideas.

The government has not succeeded in projecting this message. It has been drowned out by a three-part harmony of the opposition, the media, and some elements of the military top brass. I am not saying that governments’ war records should not be scrutinised, but I would urge that some of these criticisms should be approached with a dash of wariness.

Take the Conservatives, for example. Accusing the government of being callous and obstructive towards the armed forces has allowed them to ride the wave of public disquiet over the war without seeming unpatriotic or having to perform an embarrassing u-turn on their original support for it. Liam Fox’s attempt to stoke public outrage over MoD bonuses for ‘bureaucrats’ was perfect illustration of this. Unable to bring himself either to attack the war directly or to support it with bipartisan maturity, he resorted to laying into the members of the war effort that he thinks he can get away with caricaturing: ‘desk-jockeys’ and bunging Bob ‘Aintworthit’. Demonising civil servants also helps Fox soften the ground for his own plans to slash the number of civil servants at the MoD, something which, whatever inefficiencies there are at the Ministry – might not otherwise seem like a war-time imperative.

Much of the national media is engaged in a similar exercise of trying to discomfort the government as sensationally as possible without appearing to undermine the war effort. Journalists have acquired a queasy zeal for stirring up the raw grief of the recently bereaved over ‘insults’ to the war dead such as mis-spelt condolence letters. The tactic is unfair – any counter argument is bound to look defensive and self-serving when juxtaposed with a mother’s tears – but it sells newspapers, fills hours of rolling news time with mind-fogging human interest journalism and is cheaper and safer that real war reporting. There may be more specific motivations as well. Not only has the Sun, the instigator of the Jamie Janes affair, switched allegiance away from Labour to the Tories, but, according to a report in The Observer, its vicious campaign against the MoD can be dated to its refusal this summer to grant Sun reporters greater access to troops in Helmand.

In the past three weeks, I’ve noticed a slight abatement in the attacks on the government. This could be due to a number of factors – boredom with the subject, recognition of the public’s unease with the excesses of the Jamie Janes affair – but I would attach some importance to the government’s decision to go on the attack over the media coverage. Lord Mandelson’s much reported comment on the Today programme at the peak of the Janes episode that anyone who read the Sun would think that the enemy of the troops was the government not the Taliban was a much needed slap in the face to an increasingly hysterical media. The effect was not immediate – the MoD bonuses story broke later that week – but the tide did start to recede and it illustrated that the government should not be afraid to go on the front foot and confront the more cynical and unseemly aspects of the media’s war coverage. Constant, patient reiteration of the government’s position is not enough. Over October and November the government sent out ministers pretty much every day to all the major news bulletins to explain why we are there, what the strategy is and what victory will look like, and every night Jon Snow would still bark at his audience that the government just isn’t making the case for war.

Even harder to surmount are the criticisms that have been levelled at the government and Brown in particular from certain former and current military commanders, who have made clear their frustration at chronic underfunding and foot-dragging in both the Iraqi and Afghan conflicts. Sending troops into battle underequipped is inexcusable. What does trouble me is that equipment failure and Brownite penny-pinching have now become the dominant narrative for strategic setbacks in both Iraq and Afghanistan. Eclipsed from accounts of defeat in southern Iraq are the deals were struck in Basra with Al-Sadr and the infiltration from the outset of the police we were training by Shi’i. Setbacks in Afghanistan are presented as entirely due to lack of helicopters, the strategy of scattering units across northern Helmand in spits and spots features nowhere in the public discussion of the war, neither does any serious discussion of specific blunders where ground was lost. Is it really the case that but for too few helicopters British military commanders (no-one doubts the troops have been exemplary) would have been entirely vindicated in their claims at the start of the Iraq war that they were the best in the world at counter-insurgency? The Spectator recently published an interesting piece on the British in Afghanistan by Paul Robinson in which he recalled the German Dolchstosslegende (‘stab in the back myth’) at the end of the first world war, where generals, who occupy a morally elevated status at times of war, tried to salvage their own reputations by saying that they would have won had it not been for the cowardly left-wing pussies back home. It’s not a point that I would expect or recommend ministers to make on the GMTV sofa, but it’s just something to bear in mind during the current vogue for belittling democratic politicians.

My aim here is not to whitewash the government’s war record, which no-one would argue has been particularly distinguished. I just can’t bring myself to believe that the heavy-weather made of two separate expeditionary wars is entirely the fault of one man thousands of miles away in Westminster. I can, however, see how to portray it as such allows certain individuals to wriggle out of their association with an unpopular war.