In a statement today Kensington Palace said: 'Prince Harry has completed his attachment to 3 Regiment Army Air Corps and will now take up a Staff Officer role in HQ London District.
'The Prince will take the position of SO3 (Defence Engagement). His responsibilities will include helping to co-ordinate significant projects and commemorative events involving the Army in London. Prince Harry will retain the rank of Captain and be based from Horse Guards, in Central London.
'Prince Harry spent three and a half years in training and operational service with the Apache Force during his attachment to the Army Air Corps.'
Lieutenant Colonel Tom de la Rue, who commanded Prince Harry in the Army Air Corps said: '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.'
Prince Harry began the 18-month Apache training course in July 2010 at Middle Wallop, moving to Wattisham Airfield in Suffolk in April 2011 to undertake the second part of his course.
During the training course, Captain Wales was awarded the prize for best Co-Pilot Gunner.
He became a fully operational Apache Attack Helicopter Pilot in February 2012.
In September of that year he was sent on a four-month operational tour of Afghanistan, where he worked as part of the Joint Aviation Group (JAG) which provides helicopter support to the International Security and Assistance Force (ISAF) and Afghan forces.
In July 2013, Prince Harry qualified as Apache Aircraft Commander.
Sources suggested today that Harry's sudden career change was very much tied up with his desire to bring the Warrior Games to London.
The prince attended the event in Colorado Springs last year, during an official tour of the US in May, and was, in his own words, 'blown away' by the inspirational event.
The Games brought together more than 300 injured servicemen and women from the UK and US to compete in a paralympic-style tournament.
In a speech at the opening ceremony, Harry explained that he first encountered the Warrior Games when he travelled to America in 2012 to collect a humanitarian prize for his charitable work supporting the UK's Armed Forces.
He said: 'A year ago I was in Washington on the Ambassador's lawn to plant a tree, which is what most of our family do nowadays, but after doing that I had the chance to meet some of the US and UK teams.
'I remembered thinking to myself how unfortunate I had been by not having the chance to go to last year's Warrior Games to see them win all their medals - despite of the fact we weren't officially part of it.'
As a result, he said, he told his team at St James's Palace that 'no matter what happens we need to be here, we need to get ourselves involved in the next one - and here we are.'
He added: 'In the last 12 months since we last met, since I was last on the Ambassador's lawn, I found myself serving alongside UK and US troops in Helmand Province, along with other nations obviously.
'Some of them just voices on the radio to myself, others showing us great hospitality in (Camp) Bastion. No matter the detail or the accents I witnessed at first hand the bravery of our troops - not only in confronting the dangers of the battlefield, but also its tragic consequences: life-changing wounds and the death of friends.'
Harry is often described as a 'soldier's soldier' and has made clear he wants to devote much of public efforts to supporting servicemen and women who have been injured in the line of duty.
After carrying a touch at the opening ceremony last year he called for the Warrior Games to be brought to Britain and said he couldn't think of a better use for the Olympic Stadium in London.
He said: 'I only hope in the future, the near future we can bring the Warrior Games to Britain and continue to enlarge this fantastic cause.
Prince Harry, pictured during a visit to the Royal Marines Tamar centre at the HM Naval Base, Plymouth, became a fully operational Apache Attack Helicopter Pilot in February 2012
+8
Prince Harry, pictured during a visit to the Royal Marines Tamar centre at the HM Naval Base, Plymouth, became a fully operational Apache Attack Helicopter Pilot in February 2012
'I don't see how it wouldn't be possible to fill a stadium with 80,000 people, not to watch Olympics, not to watch Paralympics but to watch wounded servicemen fight it out amongst each other - not on a battlefield but in a stadium.'
He later told reporters he would 'make it his mission' to being the games to London.
It is now understood that plans to bring the Warrior Games to London next year are '90 per cent in the bag' and that Harry will play a central part in their organisation.
An aide confirmed: 'I think we can expect an announcement in the next four weeks or so. The prince has spoken with passion about his enthusiasm for the Warrior Games and would be heavily involved in their planning.'
Asked about his sudden change of career, a senior source said: 'Prince Harry wants a career in the military and it is not unusual for an officer to change his career path after this length of time. He has achieved an awful lot in the time he has been doing the job. It is not unusual for an officer of his rank to leave and take up something elsewhere.
'The fact is that he has to gain experience in other field in order to move up the ranks and this is an opportunity for him to do so.'
Asked whether he would be helping to organise events such as the annual Trooping the Colour to mark the Queen's birthday as well as taking part in them, the source said: 'He is one of a team organising key events, but yes.'
The prince was an Apache helicopter commander and co-pilot gunner and flew missions in Helmand Province during his last deployment to Afghanistan completed in January last year.
Officers who want to progress their careers will at some point need to complement their operational experience with a managerial desk job in the UK.
If Harry wants to reach the rank of major a period broadening his military skills will help him achieve his goal - and he could return to fighting on the front line at a later date.
- Daily Mail