Princess Diana was "looking for an ally" to take on Prince Charles when she allegedly leaked royal directories to the News of the World's Clive Goodman in 1992, the Old Bailey has heard.
Goodman said Diana, who separated from her husband in 1992 after 11 years of marriage, passed him information relating to the royal household and staff in an envelope sent to his office in Wapping.
The Princess of Wales wanted "to show there were forces that would rage against him", he said while giving evidence at the trial into phone hacking.
"She felt she was being swamped by people close to his household," Mr Goodman added.
Diana and Charles eventually divorced in 1996. She was killed in a car crash in Paris a year later.