Princess Diana leaked information about the Prince of Wales to "an ally" in the press to "take on" her estranged husband, the phone hacking trial in London heard.
Former News Of The World reporter and royal editor Clive Goodman told the Old Bailey how the princess, who separated from Prince Charles in 1992 after 11 years, passed him information relating to the royal household and staff in an envelope.
Mr Goodman said: "She was going through a very, very difficult time.
"She told me she wanted me to see the scale of her husband's staff and household, compared with others.
"She felt she was being swamped by people close to his household. She was looking for an ally to take him on - to show there were forces that would rage against him."
Mr Goodman, 56, of Surrey, denies two counts of conspiracy to commit misconduct in a public office.
The court has already heard how former News Of The World and Sun editor Rebekah Brooks offered Mr Goodman a backroom job in 2007 following his release from prison for his part in phone hacking, but he declined the offer.
Mr Goodman told the court he used "Green Books" and internal telephone directories containing contact numbers for royal staff and senior members of the household, for stories.
He recalled how one Green Book was given to him in 1992 by the princess.
Mr Goodman said: "That arrived at my office in Wapping with my name on it.
"She had a relationship with several journalists - Richard Kay at the Daily Mail, Martin Bashir of Panorama."
He said the royal had been going through "a very tough time" - only to be cut off by judge Mr Justice Saunders and asked to stick to what she had told him.
Mr Goodman said he did not pay for the books.
Mr Goodman, who was dismissed in 2007 following his conviction, and six other defendants, including Mrs Brooks, deny all charges.
The trial continues.
Why are you making commenting on The Herald only available to subscribers?
It should have been a safe space for informed debate, somewhere for readers to discuss issues around the biggest stories of the day, but all too often the below the line comments on most websites have become bogged down by off-topic discussions and abuse.
heraldscotland.com is tackling this problem by allowing only subscribers to comment.
We are doing this to improve the experience for our loyal readers and we believe it will reduce the ability of trolls and troublemakers, who occasionally find their way onto our site, to abuse our journalists and readers. We also hope it will help the comments section fulfil its promise as a part of Scotland's conversation with itself.
We are lucky at The Herald. We are read by an informed, educated readership who can add their knowledge and insights to our stories.
That is invaluable.
We are making the subscriber-only change to support our valued readers, who tell us they don't want the site cluttered up with irrelevant comments, untruths and abuse.
In the past, the journalist’s job was to collect and distribute information to the audience. Technology means that readers can shape a discussion. We look forward to hearing from you on heraldscotland.com
Comments & Moderation
Readers’ comments: You are personally liable for the content of any comments you upload to this website, so please act responsibly. We do not pre-moderate or monitor readers’ comments appearing on our websites, but we do post-moderate in response to complaints we receive or otherwise when a potential problem comes to our attention. You can make a complaint by using the ‘report this post’ link . We may then apply our discretion under the user terms to amend or delete comments.
Post moderation is undertaken full-time 9am-6pm on weekdays, and on a part-time basis outwith those hours.
Read the rules hereComments are closed on this article