Image caption Mr Harvey said the prime minister was 'expressing a hope'

Armed forces minister Nick Harvey has insisted that the prime minister has not set a timetable for the withdrawal of British forces from Afghanistan.

On Friday, David Cameron said he wanted to see troops leave by 2015, speaking ahead of talks with President Obama.

But Mr Harvey said it would only happen once the country was stable enough not to "slip back into being a haven for international terrorism".

Downing Street said both men took the same view on Afghanistan.

Mr Harvey, one of the Liberal Democrat ministers in the coalition government, said the prime minister was reiterating what he hoped could be achieved.

'Expressing a hope'

Speaking at the G8 summit in Canada, Mr Cameron said he wanted to see troops home by the time of the next general election, due in 2015, "make no mistake about it".

However, ahead of talks with US President Barack Obama on Saturday, Mr Cameron told Sky News he preferred not to "deal in too strict timetables".

Some 307 UK forces personnel have died since the Afghan mission began in 2001.

Mr Harvey said Mr Cameron had been "expressing a hope" by making the comments.

"He's not committing to a firm timeline. It's actually exactly the same forecast that I was making during the course of the election. And I think it's just putting into the public mind a sense of an overall time frame but it's not committing a particular calendar date for coming out," he said.

We do not want foreign soldiers, foreign troops in Afghanistan for one day longer than is necessary Sir Jock Stirrup, Head of the Armed Forces

"It will depend on the conditions on the ground. But I think he's trying to avoid the confusion in some peoples' mind that it might all be over in a matter of months."

The head of the Armed Forces, Air Chief Marshal Sir Jock Stirrup, has said that he still expects British forces and others to be able to hand over security responsibilities to Afghans by 2014.

He said: "We have to remember that we are there militarily for two reasons, to hold the ring until the Afghans are ready and to help them get ready.

"Once they're ready they'll be doing it. We do not want foreign soldiers, foreign troops in Afghanistan for one day longer than is necessary for the support of the Afghan people themselves."

'Shoulder the burden'

The head of the Army, Gen Sir David Richards, said a five-year target would allow the UK to complete its mission.

He said: "There is measurable progress being made; we now need to accelerate that within this very clear indicator we've got another five years in which to do it. I was actually worried that people might say we have got less.

"And finally, the prime minister and President Obama have made it clear that it is conditions-based, and we're leaving behind even at that point the sort of help that will enable their army to take on the challenge that we currently shoulder the burden of in the main."

During the election campaign, Mr Cameron said he would like to see troops brought back during course of this Parliament.

Interviewed in Canada, where he will take part in the G8 and G20 summits, Mr Cameron told Sky News: "We can't be there for another five years, having been there for nine years already.

"But one thing we should be clear about - Britain should have a long-term relationship with Afghanistan, including helping to train their troops and their civil society, long after the vast bulk of troops have gone home."

Mr Obama wants a US drawdown of troops to begin next summer although US General David Petraeus - who this week replaced the sacked commander of multinational forces Stanley McChrystal - is among those insisting that has to be based on conditions on the ground.

Some 10,000 British soldiers are based in Afghanistan, many fighting a counter-insurgency campaign in the southern Helmand province.