The controversial "Squidgygate" tapes were probably the work of the British intelligence listening station GCHQ which routinely bugged the conversations of Diana, Princess of Wales, her inquest heard.
The recordings of Diana talking on the telephone to close friend James Gilbey were probably made by the security centre and broadcast over the airwaves for radio hams to pick up, the Princess' former protection officer told the hearing.
Transcripts from the tape were published by a tabloid newspaper in 1992 and a phoneline was even set up so readers could ring in and listen for themselves.
Ken Wharfe, who guarded Diana for around seven years until 1993, told the inquest: "It's my belief this internal recording was probably made by GCHQ…they probably had a good reason for doing it.
"For some unknown reason this conversation is released on a loop to allow (radio hams) Cyril Reenan and Jane Norgrove to pick them up."
Questioned by Michael Mansfield QC, representing Mohamed al Fayed, about the bugging of Diana's telephone conversations the former protection officer replied: "It's my belief GCHQ at that time were monitoring members of the royal family because of heightened IRA activity at the time."
During the taped conversations Mr Gilbey is heard repeatedly affectionately calling Diana by the pet name "Squidgy" and telling her repeatedly: "I love you."
The tender words on New Year's Eve 1989 were uttered while the Princess was staying with the Queen at her Sandringham estate in Norfolk and her friend was at an undisclosed location talking on a mobile phone, the inquest jury was told.
Retired bank manager Mr Reenan later admitted recording the conversation using a radio scanner and selling it to a national newspaper.
He said he stumbled across the conversation by accident and recorded it to prove to his wife he had really taped Diana.
Mr Wharfe, who wrote a controversial book about his years guarding the Princess and her sons, said Diana confirmed to him that she was the woman on the tape and even rang the newspaper phoneline to listen to it.
“Diana was more concerned purely from an embarrassment point of view that this was in the public domain,” he told the hearing.
He explained that the Queen told the Princess she was “unhappy” about the tape and ordered an inquiry into the incident but he did not know the result of the investigation.
He also described how Diana revealed that the monarch did not support her work with HIV/Aids sufferers.
Famously the Princess was the first member of the British royal family to have contact with a person suffering from the devastating disease.
In the late 1980s, when many still believed the illness could be contracted through casual contact, she sat on the sickbed of a man with Aids and held his hand.
Mr Wharfe told the inquest sitting in central London: “The Princess would go to see the Queen on a number of occasions. (Once) she returned to the car distressed. I asked: ’What’s the matter?’ and she said: ’The Queen doesn’t like me getting involved with Aids… (and said) Why don’t you get involved with something more pleasant?’.
“I think Diana was very angry and annoyed the Queen could not see what she was doing. She felt a member of the Royal Family should be involved with campaigns to find a cure for Aids.”
Last November, during a state visit to Uganda, the monarch publicly acknowledged the plight of Aids victims when she shook the hand of an HIV-positive man during her first visit to a specialist Aids clinic.
Questioned by Mr Mansfield about security arrangements around Diana in the weeks leading up to her death in the summer of 1997, Mr Wharfe said those around her had made the mistake of “alienating” the media by treating them as the enemy.
A better approach would have been to work with them by providing the paparazzi with pictures in order to defuse situations, he suggested.
The former royal protection officer said the media had no motive to cause the Princess or Dodi Fayed any harm but press and security relations had become problematic by August 30, 1997 when the couple flew from Sardinia to Paris.
He said: “If they were managed in a (better) way, this would never have happened. This cat-and-mouse game (with the press), which began in Sardinia, was, to me, the beginning of the end.”