David Cameron has given a "firm commitment" that British combat troops will withdraw from Afghanistan by 2015.
The prime minister, who attended a Nato summit at the weekend, told MPs the country needed to know "there is an end point to all of this".
Labour leader Ed Miliband promised his party would show a "unity of purpose" with the government over ending the Afghanistan conflict.
The UK has more than 10,000 troops stationed in the country.
Mr Cameron said the Nato meeting, in Lisbon, had shown the military alliance was "as solid as ever".
In his statement, he told the House of Commons that the UK would hand over responsibility for security to Afghan troops by the end of 2014, adding that this was "entirely consistent" for plans for a 2015 withdrawal.
Mr Cameron said: "The bravery and sacrifices of our forces are helping to make this country safe.
"But, having taken such a huge share of the burden and having performed so magnificently since 2001, I believe the country needs to know there is an end point to all of this, so from 2015 there will not be troops in anything like the numbers now and crucially, they will not be in a combat role.
"That is a firm commitment and a firm deadline that we will meet."
Mr Miliband said: "The best way we in this House can support our troops is at all times seeking to build unity of purpose and I am determined to do that on the issue of Afghanistan.
"Can I say in that context that we support the outcome of the Nato summit on Afghanistan."
He said Labour "strongly" supported the Afghan forces taking "full security responsibility" in 2014 and agreed ending British combat operations in 2015 was "right".
But Mr Miliband questioned the role of troops after 2015, saying: "As you will know, the nature of training in Afghanistan often involves front-line exposure, so maybe you can say something more about whether troops will effectively be in some sort of fighting role beyond that date?"
Mr Cameron replied: "We've done very well to staff up the training mission... Britain itself has added another 320 trainers.
"I very much see this as training and not combat. I think by that stage we will be looking at something that is much more of a training mission rather than quite as much as embedding that we've had now."