Princess Diana gave a royal phone directory to a British tabloid to "take on" her estranged husband, a court in London has been told.
Former News of the World royal editor Clive Goodman told the phone-hacking trial at the Old Baily he was sent the 1992 book because she was looking for "an ally" in the press.
Mr Goodman denies paying police for royal phone books and conspiracy to commit misconduct in a public office, the BBC reports.
Princess Diana, who separated from Prince Charles in 1992 after 11 years of marriage, sent the book to the newspaper and later called him to check he had received it.
"She told me she wanted me to see this book, she wanted me to see the scale of her husband's staff and household, compared to the scale of hers.
She was in a very bitter situation with the Prince of Wales at the time, she felt she was being swamped by the people close to him. She was looking for an ally and to take him on to show the kind of forces that were ranged against her."
Mr Goodman, 56, said the book was one of a number that "came to me over a number of years" and said none had come from a public official and he had not paid for these books.
He said a senior valet to Prince Charles, Kenneth Stronach, provided him with two telephone directories, or "green books".
The former editor told the court he used green books and internal telephone directories (ITDs), containing contact numbers for royal staff and senior members of the household, for stories. He said the information was largely in the public domain - but the books and ITDs collated it.
Mr Goodman gave examples of how he used the numbers, including one in which he recalled how he contacted a source on the night of Princess Diana's death after the royal press office "was frankly useless".
The jury has previously been told of Mr Goodman's 2007 conviction for phone hacking. Asked by his barrister David Spens QC if he ever used information in a green book for hacking purposes, he responded "No."
Princess Diana and Prince Charles divorced in 1996. She was killed in a car crash in Paris a year later.