LONDON -- Prince Harry formally ended his full-time military service in Britain's army Friday, wrapping up a career in which he qualified as an Apache helicopter pilot and completed two tours of duty in Afghanistan.

The move was no surprise -- the fifth in line to the British throne had revealed in March that he intended to end his service to take a more vigorous role in his charitable endeavours, particularly those in Africa. The 30-year-old Harry now will spend the summer working with animal conservation groups there, fulfilling what he has called a long-held dream.

Harry will work with the Zoological Society of London and with experts in wildlife protection in Namibia, South Africa, Tanzania and Botswana, sometimes helping rangers respond to reports of poaching attacks on elephants and rhinos, Kensington Palace said.

"Prince Harry will be one of the best-informed ambassadors for the conservation community on what is really happening on the ground in Africa," said Jonathan Baillie, the director of conservation programs at the society. "His experience will be of great value."

Harry has in the past praised the military for keeping him out of trouble, telling the Sunday Times a few months ago that military life gave him a chance to "escape the limelight."

"Definitely, without a doubt, it does keep you out of trouble," he said. "I dread to think where I'd be without the army."

Harry also spearheaded the Invictus Games -- an international sports competition for injured armed service personnel -- and recently undertook an attachment with the Australian Defence Force.

"The experiences I have had over the last 10 years will stay with me for the rest of my life," he said in statement when his departure was first announced in March. "For that, I will always be hugely grateful."