Prince William has qualified to command a Royal Air Force search and rescue helicopter, the royal household said Thursday.

"Flight Lieutenant Wales, as he is known in the military, will now command search and rescue operations in RAF Sea King helicopters," a statement said.

"Until now, Flight Lieutenant Wales has only co-piloted the aircraft."

The 30-year-old prince, who is second in line to the throne after his father Prince Charles, has spent two years training and studying for the role, it said.

He passed the captaincy tests, which involve responding to various emergency scenarios, on May 29.

William "demonstrated the required standards needed for the award of operation captaincy," said Wing Commander Mark Dunlop, the officer in charge of his squadron.

The tests included carrying out an airborne search for a yacht, a search for stranded mariners in water, putting out a simulated fire on a large vessel, and hunting for two missing kayakers.

The prince's RAF rank remains unchanged at flight lieutenant.

The Duke of Cambridge has trained at RAF Valley, an airbase on Anglesey in northwest Wales, where he and his wife Catherine -- whom he married last year in a spectacular ceremony watched around the world -- have a home.

The pair have spent much of the past few days taking part in the celebrations marking the diamond jubilee of William's grandmother, Queen Elizabeth II, but the prince also has a full-time military career.

His search and rescue role took him in February and March to the Falkland Islands in the South Atlantic, sparking anger from Argentina, which claims the territory as its own and described his tour as a "provocation".

William trained at the Sandhurst military college and joined a Household Cavalry army regiment before switching to the air force. Because of his royal role he is also commissioned as an officer in the army and navy.

[Prince William prepares to board the royal barge 'Spirit of Chartwell' during the Thames Diamond Jubilee Pageant on the River Thames in London on June 3. AFP Photo/Stefan Rousseau]