The Duke of York has praised the medical care wounded troops have received in Afghanistan during a surprise visit to the country.
Prince Andrew met military personnel from all three services and their civilian support on an unannounced two-day trip to Camp Bastion.
Senior commanders updated him on developments since his last visit to the military base in November.
All British troops are due to leave Afghanistan by the end of this year.
At the state-of-the-art Role 3 hospital , he praised the medical care injured service personnel have received from all coalition nations and thanked the Medical Emergency Response Team for their job providing support to troops on the ground.
The duke said: The medical advances made at the hospital in Camp Bastion over the last few years are just outstanding - I know some of the people who have been through here and I've seen them on a number of occasions.
"The trauma expertise that you've been able to develop here and take back to the NHS is remarkable. It is a very valuable service that you provide, so thank you very much indeed. I hope the rest of your tour goes well."
The duke, a former pilot in the Royal Navy's Fleet Air Arm, met personnel from the Joint Aviation Group and from 903 Expeditionary Air Wing, who manage the base's vast airfield.
He also met soldiers from the Manoeuvre Battle Group who told him about their experiences patrolling outside the perimeter to protect the base from insurgent attack.
The duke had lunch with members of the Royal Electrical and Mechanical Engineers and the Royal Artillery, and flew to Kandahar Airfield to meet Army and RAF personnel who provide support to operations in southern Afghanistan.
Lt Col Will Davies, commanding officer of the Manoeuvre Battle Group Brigade advisory team, said: "It's not every day that you meet a member of the royal family. To meet the Duke of York in the middle of Helmand is really something.
"I know that the Queen's Dragoon Guards' soldiers really enjoyed speaking to him and chatting about how this place is changing. This will be his last visit here and we are really grateful to him for coming so close to the end."