Prince Harry's 10-year career with the Army has officially come to an end.
Announcing his decision to leave the forces last month, the 30-year-old said he had an "epic 10 years" and that Army life kept him "out of trouble".
The prince's first tour of duty in Afghanistan came in 2008.
The fifth-in-line to the throne, Harry, who was known in the Army as Captain Wales, returned to the country in 2012. Highlighting the young royal's accomplishments Kensington Palace said in a statement: "The prince has had a fulfilling military career and considers it a huge honour to have served his country in the armed forces, during which time he has undertaken two operational tours of duty in Afghanistan, qualified as an Apache Aircraft Commander, spearheaded the Invictus Games and - most recently - undertaken an attachment with the Australian Defence Force."
Sir Nicholas Carter, Chief of the General Staff, said that the prince had "achieved much in his 10 years as a soldier and has been at the forefront throughout his service".
Speaking recently about his decision to join the forces, he said: "I did it because since I was a kid I enjoyed wearing the combats, I enjoyed running around with a rifle, jumping in a ditch and living in the rain, and stuff. But then when I grew up, it became more than that, it became an opportunity for me to escape the limelight.
"I've had an epic 10 years, I've had great fun. The Army keep giving me great jobs, and I can never thank them enough for that."
He added that it had been a difficult decision to leave the armed forces. Prince Harry was knighted by his grandmother, the Queen, in a private ceremony in Buckingham Palace on 4 June. He was made a Knight Commander of the Royal Victorian Order (KCVO) for "services to the sovereign".
On 11 June, Prince Harry led a service to remember the members of the British armed forces who were killed in Afghanistan.
He has pledged to ensure work with military personnel in the Commonwealth continues to be a "permanent feature" of his royal and charitable duties.
From the autumn he will work as a volunteer with a Personnel Recovery Unit in London, where he will help wounded soldiers with their rehabilitation.
Having retired from military duty, Prince Harry will now focus his energies on his passion for conservation. He is due to travel to Namibia, South Africa, Tanzania and Botswana where he will spend three months carrying out voluntary work with conservation experts in Africa.
He is understood to be joining a team of rangers who are the first to respond to reports of poaching attacks on elephants and rhinos.
Last month, he said: "I feel more myself in Africa... I've been wanting to do it for the past five years, and being in the Army I just never, ever had the opportunity to do it.
"With my interests in conservation which I've had all the way through, and for William's as well, it's nice for me to be able to actually get the opportunity to work with people on the ground where the truth is."
The Prince will hold a formal farewell meeting with his commanding officer later in the year.