Rebekah Brooks' evidence to MPs backed up a Sun reporter's belief that he was "not doing anything wrong" in handing over hundreds of pounds in cash to a serving police officer, a court heard.
District reporter Jamie Pyatt, 52, is on trial at the Old Bailey with head of news Chris Pharo, 46, accused of paying a Surrey police officer some £10,000 for tips between 2002 and 2011.
Around the time then editor Mrs Brooks was giving evidence to MPs, Pyatt was engaged in buying a photograph of the notorious "trophy rapist" Tony Imiela from his police contact, the court heard.
He recalled watching his boss and then News of the World editor Andy Coulson on the television as they answered questions at the culture media and sport select committee on Tuesday, March 11 2003.
He said Mrs Brooks had told MPs that police had been paid and Mr Coulson had added that the newspaper was "operating within the editors code, within the law, in the public interest".
When MP Chris Bryant told them that it was illegal for police officers to receive payments, Mr Coulson responded: "No, I just said we operate within the law", the court heard.
Cross examining Pyatt, Julian Christopher QC said: "It would be fresh in your mind when you were dealing with officer 2044?"
Pyatt said: "It just made it clear to me that I was not doing anything wrong."
The prosecutor went on: "Did it not make you give pause? So you do not remember having any such thoughts being engaged in the next few days requesting payment of £500 for a police officer source?"
Pyatt replied: "Absolutely not. This backs up everything I have ever believed - that News International pays public officials for information."
Mr Christopher said: "Why did you think this was an okay thing to do, to pay secretly an officer for a photo?"
The reporter responded: "It was not a secret. I had been open with my office. I would not have received the money if I had not told them what I wanted it for."
When asked if he had contacted the police press office about it, Pyatt said: "No. I had no reason to."
He added: "What is quite clear is the photo could not be used because identification was an issue. It was quite clear that after the court case was completed the photo would be released by the police."
The court heard that in all, the officer had received £1,500 for the information he provided Pyatt about the Imiela case which had "snowballed" up the news agenda.
The defendant has told jurors that the Sun news desk had originally given him the police contact in 2000.
Pyatt, from Windsor, and Pharo, from London, deny aiding and abetting the police officer to commit misconduct in a public office.
Press AssociationReuse content