British forces have suffered their 100th death in Iraq, and another 3,300 troops are being sent to Afghanistan. Nick Morrison asks if there is an end in sight to UK military involvement at the sharp end of the war on terror.

NO-ONE said it was going to be easy. We were warned we were in it for the long haul. And every effort was made to quell the optimism created by the speed of the initial military success. The battle may have been swift, but the War on Terror was an altogether different prospect.

But if anyone had suggested that five years after toppling the Taliban in Afghanistan, and three years after overthrowing Saddam in Iraq, British troops would still be deeply embroiled in both countries, with seemingly no prospect of an early departure, they would surely have been branded a doom-monger.

Yet that is what has happened. Yesterday came the death of the 100th British soldier in Iraq, killed in an explosion in the port of Umm Qasr, one of the first cities captured in the 2003 invasion. With the US death toll passing 2,000, there is little sign of the insurgency ending and of Iraqi security forces being in a position to take control.

And while Afghanistan has largely slipped from the news, the situation there appears no less volatile. A conference in London yesterday saw international donors pledge almost $2bn in aid for Afghanistan over the next five years, and last week the Government announced it was sending a 3,300 strong taskforce to the southern Afghan province of Helmand, including 300 soldiers based at RAF Dishforth, near Ripon in North Yorkshire.

The turmoil following the invasion of Iraq has led to criticism that the problems have been caused by a lack of planning for the post-invasion period, but this is to misread the situation, according to Nick Megoran, of Newcastle University. Instead, he says, the difficulty lies much deeper than that.

'The Americans put themselves in an impossible situation and made a whole series of false assumptions about how they would be received," says Dr Megoran, lecturer in geopolitics and specialist in Central Asia. "This was always an invasion by a hostile power which had caused immense damage to Iraq over the years."

He says hostility to the American and British occupation is growing, with one Iraqi paper last week reporting large anti-British demonstrations in Basra, protesting against the treatment of Iraqi detainees. "As long as the occupation continues, more and more people are going to be grieved and there is more potential for recruiting rebels," he adds.

The British and Americans are now in an unenviable Catch 22 position. As long as they remain in Iraq, their presence is a provocation for the insurgents. But as long as the insurgency continues, it is impossible for them to withdraw.

The situation is particularly bleak in the Sunni strongholds of central Iraq. The difficulty in recruiting Sunnis to the security forces means these provinces are doubly occupied: once by the British and Americans, and again by Shi'ite forces, who are, if anything, more brutal.

But Dr Megoran suggests that any Allied withdrawal has less to do with the situation in Iraq than with the political climate in London and Washington. "If Iraq were to become peaceful overnight, I'm sure George Bush and Tony Blair would like to withdraw their troops," he says.

"But that won't happen, and there is no reason to predict anything other than increased violence. The answer to the question how long will the Americans and British stay in Iraq is not how long they're needed, but how long the regimes in Britain and America are prepared to sustain them."

Both President Bush and Mr Blair have such personal investment in the war in Iraq that it would be almost inconceivable for them to countenance withdrawal, but their successors may have no such constraints. Instead, it will come down to how long they can sustain the cost, both in terms of lives and hard cash.

Afghanistan may have had elections and the formation of a government since the 2001 invasion, but there is little sign of this translating into peace and stability. To some extent, this is a result of its history, an almost continual state of war for the last 30 years, and its lack of infrastructure, making it hard for Kabul to exert any sort of control over outlying provinces.

But while the Taliban fled in the face of overwhelming military superiority, they have never gone away. And the reliance on opium as the only way to make a living, and its inevitable connections with warlords and violence, has rendered much of the country a lawless state.

Withdrawal from both Afghanistan and Iraq is a question of political will and not necessity, agrees Kyle Grayson, lecturer in international politics at Newcastle University. And in each case it will depend on finding a legitimate cover.

"If they pull out at this point, the message is you can stand up to the West," says Dr Grayson. "On the other hand, staying in feeds into all sorts of messages that there is an imperial agenda and becomes a focal point for fundamentalists in the region who want to lash out at something."

But he sees in last week's announcement of a taskforce for Afghanistan signs that the British Government may be preparing the ground to pull out of Iraq. In this, they could be following the example of Canada, which has not sent troops to Iraq on the grounds they are doing their bit in Afghanistan. A presence in Afghanistan, although no less dangerous than in Iraq, has the advantage for Mr Blair of being lower-profile, and therefore less politically damaging.

"It will be far easier for Britain to leave than it will be for the United States," says Dr Grayson. "But what we may see is the UK saying we're out of Iraq but we're increasing our contribution to Afghanistan.

"There seems to be clear signalling from Downing Street that there will be a significant change in what the UK is doing in Iraq." Another advantage of this strategy is that it can be sold to Washington as Britain taking over from the United States in Afghanistan, freeing up US troops for Iraq.

"Politically, this has really hurt Labour and it could be a way to get some of its left-leaning base back," says Dr Grayson. "At the same time Afghanistan seems to be out of the collective consciousness at the moment. It is not being as involved, but at the same time having a convincing argument for withdrawal to put to Washington."

But even if there is no end in sight to the Allied occupations of both Iraq and Afghanistan, at some point the troops will be pulled out, and the likelihood is that they will not be leaving stable countries behind them. The prospects for both in the short and medium term are bleak, says Dr Megoran.

"It doesn't look too promising at all, as long as the world depends on the barrel of a gun to try and bring political change," he says. "It is very difficult to build a good house on bad foundations, and both countries will have to address the injustices of recent events before they can go on and build a future. Both of these invasions have set back the process of developing peaceful and democratic societies."