The phones of Prince William's wife Kate Middleton and Prince Harry, Queen Elizabeth's grandson, were hacked by staff working for Rupert Murdoch's now-defunct News of the World tabloid, a London court was told on Thursday.
Prosecutor Andrew Edis told the Old Bailey criminal court that recordings of messages to Kate from William, including one in which he called her "Babykins," were discovered at the home of the paper's ex-royal editor and a private eye working for the tabloid in 2006.
Then-editor Andy Coulson, who was later Prime Minister David Cameron's media chief, is on trial, along with six others, on charges that include conspiracy to illegally intercept voicemails from mobiles. They all deny the charges.
"Hi baby, it's me," William, second-in-line to the British throne, said in one message read to the jury by Edis.
The prince was at the military academy Sandhurst at the time and he tells his then-girlfriend how he almost got shot while on a training exercise.
"I walked into some other regiment's ambush, which was slightly embarrassing because I nearly got shot. Not by live rounds but by blank rounds, which would be very embarrassing though," the message said.
He adds he might later send her "a cheeky text," ending the call, "All right, baby, lots of love".
In another voicemail, he refers to Kate by her pet name "Babykins," while in a further call he discusses plans to go "beagling" — hunting with beagle dogs, Edis said.
Details which featured in the calls later appeared in exclusive News of the World stories.
William and Kate, who met as students at St Andrew's University in Scotland in 2001, married in a spectacular ceremony in April 2011 watched by up to two billion people globally. The couple have always attracted huge media interest.
The court also heard extracts of a message left on the phone of Williams's younger brother Harry in which an unknown male put on a high voice and pretended to be the prince's then-girlfriend Chelsy Davy.
'Big, hairy, fat ginger'
"I just want to say I miss you so much and I think you are the most, best looking ginger I have ever seen — although you really are quite ugly for a ginger," said the transcript which was shown to the jury.
"I'll see you very soon, you big, hairy, fat ginger."
The paper later ran a story saying the joke message was left by William for his brother.
While it was known that royal aides had previously been targeted by the paper, it was the first time it had been disclosed that any royal family members themselves were victims.
In August 2006, the News of the World's former royal editor Clive Goodman and private investigator Glenn Mulcaire were arrested and later charged with hacking the telephones of royal aides by accessing voicemail messages.
In January 2007, Goodman and Mulcaire admitted the charges and were sentenced to four and six months in jail respectively.
Further revelations about phone-hacking at the News of the World in 2011 led to widespread public anger, and the paper was closed amid a growing scandal which engulfed not just Murdoch's News Corp but much of the British establishment.
Mulcaire has now pleaded guilty to further phone-hacking charges while three senior journalists from the tabloid have also admitted conspiracy to illegally tap mobile messages.