Evidence given by former Sun editor Rebekah Brooks (then Wade) to MPs in 2003 backed up the belief of Sun reporter Jamie Pyatt 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 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 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 11 March 2003.

He said Brooks had told MPs that police had been paid and 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, 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 then 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."

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.