Leaks to a tabloid newspaper about the Duke of Cambridge and Prince Harry's time at Sandhurst would have had a "very unsettling effect" on the young officer cadets, a senior royal aide has told a court.
Jamie Lowther-Pinkerton was private secretary to William and Harry at the time when a string of stories about their progress appeared in The Sun from the royal military academy.
He told jurors in the trial of The Sun's royal editor Duncan Larcombe that such articles would have caused "suspicion" at a time when the princes needed to bond with fellow cadets and instructors.
Larcombe is accused over his contact with ex-Sandhurst instructor John Hardy who was allegedly paid more than £23,700 for providing tips on 34 occasions between February 2006 and October 2008.
Prosecutor Michael Parroy QC asked Lowther-Pinkerton: "So far as these articles were concerned at the time when they were being published was it known what the source or sources were?"
The former Sandhurst military man replied: "No, it was not."
Asked what effect that lack of knowledge would have had, he said: "It was an unsettling effect. The nature of training was very intensive, particularly if it's your first time in a military environment and relies on forming a close bond with instructors and cadets and if you don't know where that information is coming from you begin to suspect, quite naturally, where a lot of people should not suspect. It's very unsettling."
Under cross-examination, Lowther-Pinkerton agreed it was very important to the princes "and to their future as soldiers" that they did not receive any special treatment during their training.
Larcombe's lawyer Richard Kovalevsky QC asked: "Were you present when Prince William made it clear when he was having to attend duties – such as memorials and the Cenotaph – it was very important he go through Sandhurst to gain respect so he could discharge that function?"
Lowther-Pinkerton replied: "I don't remember that conversation."
The lawyer went on: "Prince William – but Prince Harry as well – …it was important to make it clear that he was going through the arduous process at Sandhurst without any special favours and if in fact records came out that he was doing well, all to the good?"
The witness: "I don't think it would have affected his progress at Sandhurst. It was the decision of his instructors whether he was doing well or not."
The Sun's declaration in early 2007 not to use any paparazzi photographs of the then Kate Middleton was well received, he confirmed.
But Lowther-Pinkerton said he could not recall an occasion when he had personally phoned Larcombe to thank him for handing in stolen pictures to police of Prince William and Middleton on holiday on the Caribbean island of Mustique.
Kovalevsky pressed: "You had cause to phone up Duncan Larcombe to essentially convey from those whom you were working closely with their thanks for ensuring those photos were never printed."
The witness replied: "I'm afraid I don't remember."
The defence lawyer continued: "Duncan Larcombe found it exceptional that you did that. Those photos were stolen from a member of Miss Middleton's family."
Lowther-Pinkerton said: "I do remember that."
The trial later heard from Lieutenant Colonel Roy Parkinson, of Sandhurst Military Academy, who told how security had to be "beefed up" after The Sun got hold of details of the Princes' training schedule.
He became concerned after photographs emerged from training operation Long Reach in the Welsh Black Mountains but, because the cadets crossed public rights of way, there was nothing to stop journalists with inside knowledge from turning up.
He said: "It is very worrying that we knew someone was leaking details of the training programme.
"William and Harry had their own security details but, because we knew someone knew the programme, security had to be beefed up for everyone, not just for these exercises but for them all."
Former colour sergeant Hardy is charged with misconduct in a public office between 9 February 2006 and 16 October 2008 while Claire Hardy is accused of aiding and abetting him in the offence.
Larcombe is charged with aiding, abetting, counselling and procuring John Hardy's offence.
They are in the dock alongside chief reporter John Kay, executive editor Fergus Shanahan and deputy editor Geoffrey Webster, who are charged with conspiring with each other and Ministry of Defence official Bettina Jordan-Barber to commit misconduct in a public office between 1 January 2004 and 31 January 2012.
Webster also faces a second count of conspiracy to commit misconduct with a serving officer in the armed forces between 3 November and 6 November 2010.
Kay, 71, of Golders Green, north London, Larcombe, 39, of Aylesford, Kent, Webster, 55, of Goudhurst, Kent, Shanahan, 59, of Felsted, Essex, and John Hardy, 44, and Claire Hardy, 41, of Accrington, Lancashire, deny the charges against them.
Email pged@pressgazette.co.uk to point out mistakes, provide story tips or send in a letter for publication on our "Letters Page" blog