Miliband urges world leaders to up their game over Afghanistan
The international community must "up its game" to secure a lasting political settlement for Afghanistan, the Labour leader Ed Miliband has said.
Speaking from Kabul, he said the best way to honour the sacrifice made by British troops was to ensure the country does not become a failed state.
"There is a lot more work to do to make that happen", Mr Miliband told the BBC.
Later it was announced that a soldier from 1st Battalion, The Royal Welsh, had been killed in Helmand Province.
Mr Miliband was joined on his second Afghan trip since becoming Labour leader by the shadow defence and foreign secretaries.
Mr Miliband met the Afghan President Hamid Karzai for talks at the British Embassay in Kabul.
The Labour leader's visit was kept secret for security reasons, and the trip was not reported until he left the capital.'Home to terrorism'
Speaking outside the British Embassy, Mr Miliband paid tribute to the "extraordinary job" that British troops are doing in Afghanistan, but urged political leaders around the world to ensure the country has a stable future.
"Unless you have stability in Afghanistan it could again become a home to terrorism, we do not want that to happen.
"I do not think we can just abandon Afghanistan, I do not think we can say: right, we are off.
"Investment in Afghanistan is important and will continue to be important, but the problem is the development part is not enough on its own.
"Part of the discussions... I will be having with the government leaders I meet today is to say, how are we going to drive this forward?" Mr Miliband said.
As part of his "solution" for Afghanistan, he urged Afghan tribal leaders to keep terrorist group al-Qaeda out of the country.
"People have to renounce al-Qaeda, and not work with al-Qaeda. In the end the way you succeed and the way you resolve conflicts is in part - and this is not so much for us but the Afghan government - resolving the issues with your enemies as well as your friends," he said.Full English
In the early hours of Friday morning, Mr Milband flew into Camp Bastion - the main base for UK forces in Afghanistan - for the start of his brief trip.
He joined British troops for a traditional English breakfast of fried egg, beans and sausage.
The 9,500-strong British force will reduce to 9,000 by the end of this year with combat operations set to finish by the end of 2014 at the latest.
Mr Miliband, accompanied by shadow defence secretary Jim Murphy and Labour's foreign affairs spokesman Douglas Alexander, then flew by Chinook helicopter to Lashkar Gah, the first district in southern Helmand to transfer to full Afghan control.
At a control base in the Nari Saraj district, Mr Miliband met members of the 3rd Battalion, The Yorkshire Regiment, which lost five of its men in an explosion in March.
But Mr Miliband said he was "more optimistic" than expected, about the progress being made in training the Afghan army.
He said the main aim of the trip was to thank British forces: "It is incredibly eye-opening coming out and actually seeing what they are doing, throwing themselves in harm's way every day going out on patrol.
"Seeing it up close, with people who are young enough to be my son or daughter doing that, is incredibly humbling," Mr Milband added.
A total of 414 members of UK forces have died in Afghanistan since operations began in October 2001.
The Labour leader denied his trip to Afghanistan was simply a bid to boost his public image, saying his purpose in coming "is to express the deep sense of gratitude I have for our troops."
"We are working with the Government on many of these issues. Staying away and not coming here would send the wrong message to our troops.
"People are so used to politicians having argy-bargy with each other, opposing each other apparently for the sake of it.
"On this one that is not what we are doing and I think that's the right approach."Cross-party talks
Mr Miliband said fresh laws may be needed to end discrimination at home against people who have worked for the armed forces.
The Labour leader said politicians should consider extending the sort of legal protection offered to racial, sexual and religious minorities if other ways could not be found to ensure serving and retired troops were treated fairly.
"It happens in terms of everything, from the availability of consumer credit to our troops to some of them outrageously being turned away from pubs and hotels. That should not be happening."
Mr Miliband called for cross-party talks to see if discrimination could be stamped out.
A recent poll commissioned by Lord Ashcroft suggested that more than one in five personnel had suffered verbal abuse while in uniform and almost as many, 18%, had been turned away from pubs and clubs.
Mr Miliband also ruled out breaking ranks with the government on the timetable of Britian's withdrawal from Afghanistan, which was reaffirmed in a recent Nato summit in Chicago.
He insisted he would not be following the example of the new French President Francois Hollande, who will pull French troops out of Afghanistan earlier than planned.
"What is interesting about Afghanistan is that whether you were for the mission originally or against the mission, to suddenly up-sticks now would not be the right thing to do," Mr Miliband said.