A senior Sun news editor and reporter have gone on trial accused of paying a "secret police informant" for tips.
Then head of news Chris Pharo (left) and district reporter Jamie Pyatt (right) were allegedly involved in a corrupt relationship with a Surrey police officer.
Between 2002 and 2011, the officer received around £10,000 from the newspaper, the Old Bailey heard.
Prosecutor Julian Christopher QC told jurors that during the course of his duties, the officer, identified as 2044, passed on details about incidents, arrests and celebrities.
He also had access to the police computer system to find out more information about stories, the court heard.
The lawyer said: "In short, he became The Sun's secret paid informant within Surrey police."
He told jurors that the overall picture was clear and undisputed but they had to decide if what the officer did amounted to misconduct and whether by paying him, either or both the defendants were "knowingly encouraging" the corrupt relationship.
In emails to his boss Pharo, Pyatt, who worked in the Thames Valley area, referred to his tipster as "my senior Surrey police contact … an excellent contact", jurors were told.
By 2011, Pyatt was describing him as being invaluable if any news broke in Surrey, Christopher said.
Pyatt allegedly made 18 requests for cash payments for his contact.
Christopher said: "The prosecution suggest that the evidence includes emails which make it abundantly plain that Chris Pharo knew that Jamie Pyatt was requesting payments for a police officer who had provided information which he should not have been providing and in that knowledge, allowed cash to be paid.
"Whether or not he passed on to those above him the fact that this was a payment to a serving police officer for police information may not be apparent but whether he did or not, we are concerned in this case with what he did and his state of mind when he did it."
In many cases, Pyatt sent payment requests to Pharo, so there could be "no doubt" that the senior journalist knew it was for a police officer, he added.
Pharo did not have the ultimate say in whether money was paid out, but would assess how much a source should get for a contribution to a particular story.
Christopher told jurors: "This was cash to be paid to a serving police officer in proverbial brown envelopes for providing information which everybody knew he was not allowed to provide."
When he was interviewed by police, Pyatt said he had never paid a police officer.
However, Christopher said it was now accepted to have been a lie.
Pharo, 46, from Sandhurst, Kent and Pyatt, 52, from Windsor, deny aiding and abetting misconduct in a public office between 22 April 2002 and 12 January 2011.
Christopher told jurors that Pyatt's first contact with the officer may have dated back to 2000 and a story about a rape allegation against singer Mick Hucknall.
Then in April 2002, he allegedly paid him for a story about murdered schoolgirl Milly Dowler headlined 'Milly body found'.
A month later, the prosecution alleged the same officer was a source for a follow up story headlined 'Milly man held'. However, Pyatt disputes both instances, the court was told.
Email pged@pressgazette.co.uk to point out mistakes, provide story tips or send in a letter for publication on our "Letters Page" blog