Prince Harry has said he is looking forward to a "new chapter" in his life after it was confirmed he will leave the Army in June.
Kensington Palace said the prince is to end his 10-year military career after a four-week secondment to the Australian Defence Force, starting in April.
The fourth in line to the throne said his Army experience would stay with him for the rest of his life.
The prince said he was still considering his employment options.
Prince Harry saw action in Afghanistan twice, most recently in 2012 as an Apache helicopter co-pilot and gunner.
'Really tough decision'
In a statement released by Kensington Palace, the prince said he was at a "crossroads" and quitting the Army had been a "really tough decision".
The prince, who took up a staff officer role with the Army last year, said: "I consider myself incredibly lucky to have had the chance to do some very challenging jobs and have met many fantastic people in the process.
"From learning the hard way to stay onside with my Colour Sergeant at Sandhurst, to the incredible people I served with during two tours in Afghanistan, the experiences I have had over the last 10 years will stay with me for the rest of my life.
"For that I will always be hugely grateful."
While in Australia, the prince will spend time at an army barracks in Darwin, Perth and Sydney where he will carry out unit-based activities, training exercises and domestic deployments.
He will also join his father, the Prince of Wales, at the Gallipoli commemorations in Turkey on April 24 and 25.
After his stint in Australia, he will undertake an official royal tour to New Zealand.
When he leaves the Army in June, he will do voluntary work with a conservation project in Africa and with disabled veterans back in the UK.
Analysis by Peter Hunt, BBC royal correspondent
We know what Prince Harry's giving up.
We don't yet know what will fill the considerable void that the absence of a military career will leave in his life.
It's no surprise that Harry describes quitting the Army as a "really tough decision".
He's cherished doing a job which he was given on merit - and not because he's a prince.
It's a job which, when he was in Afghanistan, included targeting and killing Taliban fighters.
In the coming months, as he undertakes voluntary work in Africa and the UK, he'll have to decide how to occupy himself in the years that lie ahead.
He's rejected, for now, the option of becoming a full-time senior royal.
Officials will be hoping he embraces something which fulfils him and which doesn't give him time to once again be cast as a party prince.
It's little wonder Harry himself talks of being at a crossroads.
'Captain Harry Wales'
Prince Harry started his full-time military duties as an officer cadet at the Royal Military Academy Sandhurst in May 2005.
He was commissioned as an Army officer in April 2006, joining the Household Cavalry (Blues and Royals). In late 2007, he spent 10 weeks in Helmand province in Afghanistan but was pulled out after the media reported his secret deployment.
He began training as an Army Air Corps pilot in January 2009, becoming a fully operational Apache attack helicopter pilot in February 2012.
Later in 2012, he undertook an operational tour of Afghanistan as an Apache pilot.
Gen Sir Nicholas Carter, Chief of the General Staff and the professional head of the Army, paid tribute to the prince.
"Captain Harry Wales, as he is known affectionately in the Army, has achieved much in his 10 years as a soldier," he said.
"He has been at the forefront throughout his service. He has insisted on being treated the same as his peers."
He praised his skill, judgment and professionalism in Afghanistan where as an Apache helicopter pilot he "selflessly" supported those on the ground.