Image caption David Cameron's visit to Afghanistan coincided with a British soldier going missing in Helmand

"If one of my predecessors had not screwed up, we would be fighting as one army."

Thus joshed the prime minister as he addressed British and American troops in Camp Bastion.

He was being rude about Lord North who presided over the loss of the colonies in the War of Independence, a war that is celebrated - at least in the US and certain parts of Afghanistan - on the fourth of July.

If you apologise for that, Mr Cameron told the Marine Corps, we will apologise for burning down the White House.

It went down well, at least, as well as anything can go down with troops who have been standing in the baking heat waiting for a VIP to come and do his bit for the cameras.

It was a rare moment of light relief in a rather grim day that was overshadowed by the death of a British soldier in unexplained circumstances.

'Dilemma'

If you are visiting Afghanistan to show there has been enough progress to start handing over control to the Afghans and bringing some troops home, this kind of incident is not what you need.

Mr Cameron's dilemma is this. He wants to bring troops home. He believes this is what the public want.

He has promised to get combat troops out by the end of 2014. He believes the deadline is putting pressure on the Afghan government to get their house in order.

But the reality on the ground is getting in the way of timetables dreamt up in Whitehall.

Commanders here believe that it would be wrong to draw down too many troops too quickly.

This would, they believe, take the pressure off the Taliban just when they finally have the numbers on the ground to make a difference.

The deputy commander of all ISAF troops in Helmand, Brigadier Nick Welsh, said any drawdown would be "manageable", but added: "It will require us to thin out in some areas."

'Change in tone'

Now a few weeks ago this would have been dismissed in Whitehall as the instinctive voice of a military bureaucracy that is reluctant to give up its toys.

No general ever says he wants less troops, officials would say. The army is desperate, they would add, to ensure that they leave Afghanistan with their heads held high. Unlike Iraq.

But that was then. At Camp Bastion the prime minister was much less bullish. Contrary to speculation, he said the numbers of British troops he would withdraw next year would be "modest".

There would not, he said, be radical change before the end of next year's summer fighting season.

Mr Cameron will give the House of Commons the precise numbers later this week but I am led to believe that it will be around 500.

This marks a distinct change in tone. Mr Cameron appears to be heeding the advice of those commanders who say that it would be better to keep troop numbers relatively stable for the next two years, keeping up the pressure on the Taliban just when the sheer scale of numbers is finally beginning to tell.

So in Afghanistan, a reality check for David Cameron. The exit route is well marked but it is still a bumpy path that will make for a hard walk.