( CNN ) -- After more than seven and a half years of military service , Prince William is leaving the armed forces to focus on royal duties and charity work , Kensington Palace said Thursday . William was a pilot with the Royal Air Force Search and Rescue Force . Known to his RAF comrades as Flight Lt. Wales , he had been stationed at a search-and-rescue base on the remote Welsh island of Anglesey since 2010 , and lived there with Catherine , the Duchess of Cambridge . Prince William : I dream of Africa . In the next few weeks , the pair will move into their official residence at Kensington Palace . The palace statement said that William is considering a `` number of options '' for public service . For now , he will focus on his royal duties . He will also expand on his conservation work , dealing particularly with endangered species . Kensington Palace announced he will become president of a new collaboration among seven environmental groups . The group , United for Wildlife , will focus on fighting the illegal wildlife trade . William will also focus on charities that deal with children , veterans and service members . CNN 's Max Foster : Tired , elated Prince William could be any new dad . William 's final search and rescue duty was Tuesday . `` He and his crew had an uneventful 24 hour shift , '' the defense ministry said . `` Throughout his tour his airmanship , often in the most demanding of conditions , has contributed directly to saving lives in the mountains of North Wales and from the ravages of the Irish Sea . He has earned the respect of all who have worked with him as a highly professional and competent pilot , '' the ministry said . Last year , he helped save a teenage girl who was in danger of drowning off the coast of Wales . The 16-year-old girl was caught in a rip current and rapidly losing strength . William , the grandson of Queen Elizabeth II , had just landed a Sea King helicopter nearby , after going out on a routine exercise , when the alert was radioed through . In less than a minute , he and the crew had reached the scene and a paramedic was winched down into the sea to assist the exhausted girl , who had just gone under water . Royal baby photos : Cozy or just bad ? There 's no suggestion that William , 31 , would ever drop out of public life , but he does crave normality . The prince gets some of that from his role in the military where he 's treated as `` one of the guys , '' but he also gets it from Africa . Dreaming of Africa is one way that William escapes from the stresses he faces , he said . `` I regularly daydream , '' The Duke of Cambridge reveals in the CNN documentary , `` Prince William 's Passion : New Hope , New Father , '' which airs later this month . `` Africa is definitely one of the places I go to ... I have hundreds of animals on my iPhone . So if I am ever having quite a stressful day ... you can put a buffalo on in the background or a cricket , '' he says .
NEW : William will become president of a group fighting the illegal wildlife trade . The new organization is called Wildlife Warriors International and it has been formed to fight for the protection of endangered species, including tigers, rhinos, elephants, lions, leopards and other animals that are threatened by poaching. He was known to his RAF comrades as Flight Lt. Wales .