The war in Afghanistan is in danger of becoming a forgotten conflict because of events in Libya and across the Middle East, David Miliband has warned.
The former foreign secretary told the BBC more effort was needed to find a political solution before British and US troops are withdrawn in 2014.
He also called for serious negotiations with the Taliban.
Since operations began in Afghanistan in 2001, 363 UK servicemen and women have died.
The most recent was Colour Sergeant Alan Cameron, 42, of 1st Battalion Scots Guards, who died from his injuries a year after he was caught in a roadside bomb in an area north of Lashkar Gah.
Speaking to BBC's Newsnight on Tuesday, Mr Miliband said it was inevitable international attention has shifted to the Middle East and North Africa in recent weeks, which has been the scene of political change and unrest.
However, he said it was "very important that we recognised the importance of the current moment in Afghanistan".
"The American surge has taken place, but without a political framework, a political settlement, then we are going to be getting closer to the end date of 2014, but without an endgame and I think that is dangerous."
Nato leaders have agreed a timetable for ending combat operations and handing over control of security in Afghanistan to Afghan forces by the end of 2014.
Mr Miliband suggested appointing a United Nations mediator to talk to all sides involved in the conflict, including the Taliban and other Afghan groups, and neighbouring countries including Pakistan, to help with the establishment of a political settlement.
"The truth is that the Taliban wants to know the position of the Western powers and until the Western powers, led by the US and the UK, set out our position on the endgame, about the presence of foreign forces, about political settlement in Afghanistan, we are not going to get a political process of real weight and drive," he said.
Mr Miliband called for urgent action, warning that as 2014 approaches, Western leverage over Afghanistan would diminish.
Mr Miliband, still a Labour MP, is travelling to the US where he will make a speech later at the Massachusetts Institute of Technology (MIT) in Boston on the need for a political settlement in Afghanistan.
BBC diplomatic correspondent Bridget Kendall, who has seen extracts of the speech in advance, said he will argue that the solution is urgent negotiations with the Taliban before it is too late, offering concessions such as prisoner releases and an end to night raids to bring them to the table.
This would be in return for guarantees that Afghanistan will never again offer a haven to al-Qaeda.