Former News of the World reporter Clive Goodman told the hacking trial today that some of his sources were members of the Royal Family.
Goodman told the Old Bailey he had dozens of sources during his time as royal editor, only some of whom he paid.
The 56-year-old, of Addlestone, Surrey, who denies conspiring to commit misconduct in public office, was questioned in the witness box for a second day.
Asked by his lawyer David Spens QC about the nature of his contacts, Goodman said: "Some worked for the Royal Family, some were friends of the Royal Family, indeed some were members of the Royal Family themselves."
He said he created two false identities which he used to pay sources for tips, in particular someone he thought was a freelance journalist, and a newspaper executive.
He claimed neither had first-hand knowledge and he had to stand up the information himself.
Asked by Spens if the system of using false names to arrange payments was known by the management at the News of the World (NotW), Goodman said: "Yes, it was."
Asked how long it had been going on, he said: "It was there when I arrived in 1986 and went on through all the way until I left in 2006."
Earlier today, the trial was told by judge Mr Justice Saunders that one juror had been excused from the trial due to ill health.
He told the remaining 11 jurors it was "absolutely vital we do not lose any more jurors".
All seven defendants in the case deny the charges against them.
Goodman told the court he did not know the true identities of the two sources he had named Mr Anderson and Mr Farrish.
He said he exaggerated the importance of his sources so his stories were more likely to get into the paper.
"Bylines are enormously important," he said. "Every few months or so there would be a byline count. If you were under-performing you would be taken in and told to buck your ideas up."
Goodman was read an email he sent to co-defendant Andy Coulson, then NotW editor, claiming he needed £1,000 to pay a Kensington Palace police officer for a "green book" – a royal phone directory.
In the email he said the book would be "extremely useful" and if the police officer was caught, he could "end up with criminal charges, as could we".
Asked by Spens if the source was in fact a police officer, Goodman denied it, saying it was probably Mr Farrish.
Asked why he wrote the email, he said he was "having trouble getting signatures" for payments from managing editor Stuart Kuttner so he wanted to make the source sound important.
Goodman told the court he learned to protect his contacts after former editor Piers Morgan made a "shameful" decision to expose a former royal source in the 1990s.
Royal aide Ken Stronach had wanted the NotW to help him get a book deal for his life story. Instead, it was decided to do a story exposing him.
Goodman said: "It was a very heartless commercial decision that he would be little use in the future as a contact.
"Against my judgment and my advice, they decided to expose him in the NotW."
Stronach was arrested, threatened with charges of theft of royal property and eventually released without charge and dismissed, he said.
Goodman said he was also "pulled up by the royal protection squad and threatened" with aiding and abetting. He said: "It was very, very nasty.
"What we did then was pretty discreditable. It was a pretty shameful thing to do."
Goodman said the incident taught him to protect his sources, even from colleagues, and secondly that it is "a dangerous world out there".