Prince Harry is to quit flying army helicopters and take up a desk job organising commemorative military events.
Captain Wales, as he is known in the military, served in Afghanistan as an Apache co-pilot gunner during his three years with the Army Air Corps.
Kensington Palace said in a statement on Friday that 29-year-old Harry “has completed his attachment to 3 Regiment Army Air Corps and will now take up a Staff Officer role”.
“His responsibilities will include helping to co-ordinate significant projects and commemorative events involving the Army in London,” the statement said.
Harry, the youngest son of heir to the throne Prince Charles and the late Princess Diana, and younger brother of Prince William, will retain the rank of captain.
On his second tour in Afghanistan in late 2012 and early 2013, Harry served as an Apache co-pilot gunner for 20 weeks in the restive southern Helmand province.
He later qualified as a commander in the attack helicopter.
Harry said during the tour that he had killed Taliban fighters, who were taken “out of the game” by his unit if they targeted British soldiers.
His first tour in Afghanistan had to be cut short in 2008 when a news blackout surrounding his deployment was broken.
Lieutenant Colonel Tom de la Rue, who commanded Harry in the Army Air Corps, praised the fourth in line to the British throne for his service.
“Captain Wales has reached the pinnacle of flying excellence as an Apache pilot, particularly in Afghanistan and, in the process, has proved to be a real inspiration to the many Army Air Corps officers and soldiers who have come to know him so well over the last two years,” de la Rue said.
All British combat troops are due to withdraw from Afghanistan before the end of 2014.