Image copyright Reuters Image caption Mr Pyatt denies the allegations against him

A reporter for the Sun said he believed he was "not doing anything wrong" in handing over cash to a police officer for tips, a court has heard.

Jamie Pyatt, 52, said he thought his actions were justified after hearing the evidence of the paper's former editor Rebekah Brooks to MPs in 2003.

Mr Pyatt and the paper's head of news Chris Pharo, 46, are accused of aiding and abetting a Surrey police officer to commit misconduct in a public office.

Both men deny the allegations.

The officer was paid £10,000 for tips between 2002 and 2011, the court heard.

Around the time former editor Mrs Brooks, was giving evidence to MPs, district reporter Mr Pyatt was trying to buy a photograph of the notorious "trophy rapist" Tony Imiela from his police contact, the Old Bailey heard.

'Within the law'

He told the court he recalled watching his boss and the former News of the World editor, Andy Coulson, as they answered questions at the culture media and sport select committee on 11 March 2003.

He said Mrs Brooks, who was then known as Rebekah Wade, 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".

The court heard how within that evidence in 2003, when MP Chris Bryant said it was illegal for police officers to receive payments, Mr Coulson replied: "No, I just said we operate within the law".

"It just made it clear to me that I was not doing anything wrong," Mr Pyatt added.

Image caption Andy Coulson and Rebekah Brooks gave evidence to MPs in March 2003

Cross-examining Mr Pyatt, Julian Christopher QC said: "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?"

Mr Pyatt, from Windsor, 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 ok thing to do, to pay secretly an officer for a photo?"

"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," the reporter responded.

In total the officer had received £1,500 for the information he provided Mr Pyatt about the Imiela case which had "snowballed" up the news agenda.

Mr Pyatt and Mr Pharo, from London, were arrested as part of Operation Elveden, Scotland Yard's investigation into corrupt payments to public officials.

The trial continues.