Ed Miliband visits British troops in Afghanistan
Ed Miliband has said he would support British military intervention in future conflicts if it was "in the national interest".
On a visit to Afghanistan, the Labour leader said maintaining strong armed forces was "an absolute commitment".
But, he declined to rule out further military spending cuts, saying Labour would "look at strategic needs".
He also promised legislation to outlaw discrimination and abuse of British troops at home.
Mr Miliband met British military personnel at Camp Bastion, where they are training members of the Afghan National Army in security operations.
'Rush to war'
Asked if as a Prime Minister he could give the public confidence he would intervene militarily in future conflicts, he replied: "Absolutely, if it's in the national interest."
He added: "I supported the government's action in Libya; I thought it was the right thing to do.
"I thought there was a clear humanitarian threat to civilians in Libya and there was a clear strategy for what we could achieve.
"Indeed, we did achieve our end of protecting Libyan civilians.
"In Syria, it would have been a rush to war and it would've been a mistake.
"That's why we took the position we did.
"No two conflicts are the same. We should support action when it's in our national interest, but we should do so always being clear that we have a proper strategy.
"A clear and worked out strategy, not a rush to war."
Mr Miliband also told BBC News the first Queen's Speech of a Labour government would include legislation to prevent the abuse and discrimination of military personnel at home.
"We know surveys suggest one in five members of our armed forces suffer abuse or are refused access to restaurants, hotels and bars," he said.
"I don't see why that should happen; I don't think that's what the British people want.
"We know the esteem in which our armed forces are held and we should reflect that in legislation.
"We have a military covenant and this is part of fulfilling that covenant, which is supported by all parties."
In a statement, the Ministry of Defence said: "The men and women of our armed forces reflect what is best in our society and any discrimination against them is unacceptable.
"We have worked hard to ensure our armed forces, veterans and families have the support they need and are treated with the dignity they deserve."
One area Mr Miliband could not put a firm commitment on was further cuts in military spending if Labour came to power.
"What I can say is a Labour government would have a comprehensive look at the security and defence needs of the country," he said.
'Further work ahead'
"That's the right thing to do, and of course maintaining a strong armed forces is incredibly important for our country.
"Obviously, the issue of the number of people we have in our armed forces is something we will be looking at as part of our defence review, but we've got to do it in a proper way."
Mr Miliband was full of praise for the British military effort in Afghanistan, but stressed there was still work ahead.
"The military part of our operation here is coming to an end, but the job isn't yet done," he said.
"We know we're going to be providing incredibly important training to the Afghan National Army, the security forces who will be keeping order in this country.
"It's so important the job we've already done there, but there's further work ahead."
In response, a government spokesman said: "While UK combat operations end this year, we will continue to help train the Afghan forces, to ensure they can deliver a more secure future for their country, which will help our security here in the UK.
"Our involvement in Afghanistan has substantially reduced the terrorist threat to the UK and helped to create a more viable state.
"We know there are many factors that will determine the future of Afghanistan.
"The UK, along with the wider international community, is committed to providing long-term support to the Afghan people to help them shape their country in the future."