A senior Sun news editor told jurors how his former boss Rebekah Brooks would turn the red top newsroom blue at a time of fierce rivalry with the News of the World.

Chris Pharo, 46, and Sun district reporter Jamie Pyatt, 52, are on trial at the Old Bailey accused of paying a Surrey police officer for tips between 2002 and 2011.

Giving evidence in his defence, Pharo told jurors about the culture at The Sun after Mrs Brooks - then Wade - was appointed editor in 2003 and Andy Coulson replaced her at the NotW.

Recalling one incident, he said: "There was a story, an exclusive, they had which we now know came from phone hacking. This was the David Blunkett story. He was having an affair with a married woman.

"That information was hacked from Rebekah's own phone from the NotW. He was leaving messages on her own voicemail asking her how to deal with the situation. It's a matter of public record the NotW was hacking her phone.

"The following morning, at 11am we all received a text message and it said something along the lines of 'yet again I have to pick up this morning's NotW and it contains another agenda setting story'.

"If you f****** c***s are not capable of matching them, I will sack the lot of you and replace you with them."

Defence lawyer Nigel Rumfitt QC asked if he felt secure in his job, and Pharo replied: "No not at any point.

"I recall the morning that text message was sent I spoke to picture editor John Edwards and he was so upset by the content he was in tears."

Pharo, who began his career in journalism at a local newspaper aged 18, told the court how Rupert Murdoch regarded The Sun as "very much his own personal fiefdom" and the "cornerstone of his empire".

Mrs Brooks got on "famously" with the media mogul, he said: "They had an extraordinarily close relationship. It was often commented on she was like a surrogate daughter."

Not long after her arrival, Pharo said she talked him out of leaving the Sun adding that she was "possibly the most charming person I have ever met".

But he went on to say she would "explode" at morning meetings and she could "sulk for days" over stories.

Pharo said: "She could often be fine but more often than not she was nothing short of a nightmare.

"You would frequently receive up to 20 abusive emails starting around 7.30am when she got the paper delivered to her home. They would continue through the day.

"Occasionally there would be an explosion in conference and she could sulk for days over a missed story."

He told jurors that she was in turn under pressure from Mr Murdoch who would phone several times a day.

Pharo recalled one occasion when he admitted in morning conference that he had a "terrible news list".

He said: "She got all the pieces of paper on the desk, screwed them into a giant paper ball and said 'if you can't put together a f****** news list in the next f******* hour, you can f*** off'.

"She stormed out of the room. It was a glass walled news room and she slammed the door so hard that she broke the door handle and her PA had to let us out of the conference room."

By the time he had returned to his desk, "hugely embarrassed and terrified", Pharo said Mrs Brooks had sent out a message to staff, saying "Have any of you got a story, because my idiot news editor cannot find any".

The defendant said that on another occasion she tried to throw her desk phone but it was plugged in at the time, and she had a punch bag in her office to "relieve her tension".

Pharo, from London, and Pyatt, from Windsor, deny aiding and abetting a Surrey police officer to commit misconduct in a public office between 2002 and 2011.

Pharo told jurors he had never heard of the officer referred to as 2044 and when he received emails from Pyatt he had no idea that he was referring to one officer as the source for all the stories.

Mr Rumfitt asked: "Did you intend to encourage the source of any particular story to provide further stories by misconducting himself as a police officer in the future?"

The defendant replied: "No, I did not."