London (CNN) -- Britain's Prince William has helped save a teenage girl who was in danger of drowning off the coast of Wales in his role as Royal Air Force search and rescue pilot.
The 16-year-old girl was caught in a rip current and rapidly losing strength when the alarm was raised Thursday, a statement from the RAF Search and Rescue Force said.
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.
The paramedic, Master Aircrew "Harry" Harrison, is quoted as saying: "We never know what we'll face when we're called out. Sometimes it's just a twisted ankle or a broken bone, but this was one rescue where we truly did arrive in the nick of time and managed to save this young girl's life."
The girl and a younger friend, who was rescued by a surfer, had been body-boarding in Silver Bay, the statement said.
Both were airlifted to the hospital in Bangor, north Wales, for treatment. The 16-year-old girl told the air crew she had thought she would drown, the statement said.
Prince William, known to his RAF comrades as Flight Lt. Wales, has been stationed at a search-and-rescue base on the remote Welsh island of Anglesey since 2010, and lives there with Catherine, the Duchess of Cambridge.
William's grandfather, Prince Philip, was admitted to a hospital in Scotland on Wednesday after the recurrence of a bladder infection and continues to receive treatment there.
Buckingham Palace said Friday that Philip was making progress but that doctors had advised rest.
CNN's Susannah Palk contributed to this report.