Former News of the World editor Andy Coulson has described his shock at the arrest of one of his reporters for phone hacking but denied he was involved in a cover-up.
During a fifth day in the witness box, the ex-No 10 spin doctor described what happened after royal editor Clive Goodman was held and police swooped on his newsroom on August 8 2006.
The Old Bailey has heard that Goodman and private investigator Glenn Mulcaire were convicted of hacking voicemails later that year.
Coulson, 46, then resigned as editor in 2007.
Earlier in the trial, Goodman, 56, said Coulson had put pressure on him to plead guilty to phone hacking and to say he had been a "lone wolf".
But today Coulson denied the accusation, and said he had acted under his duty of care to an employee.
On the arrest, he said: "It was quite shocking to have police on the floor. It was very shocking and I wanted to make sure that the right things were being done from the paper's perspective."
Coulson said it was not his job to launch an investigation himself. And, while he did not hinder the police probe, he did not volunteer information either.
As Goodman was being interviewed by police, he spoke to media mogul Rupert Murdoch and a News International (NI) lawyer.
Mr Murdoch was "concerned", Coulson said.
"He said the most valuable thing a newspaper has is the trust of its readers, and that's something that stayed in my mind."
He said the NI lawyer was "shocked" that a law designed to combat terrorism had been used against a reporter.
He told jurors: "Of course until that point nobody had any idea voicemail interception was illegal.
"He made reference to the point of law that makes voicemail interception illegal.
"He said the law that was apparently broken... was a piece of legislation to catch terrorists and he was shocked that this had happened."
Coulson said he thought at the time that Goodman's arrest spelled the end of his life as a "frontline reporter" but not necessarily his entire career.
He phoned Goodman two days after his arrest to tell him that he had been suspended and his legal fees would be paid.
Coulson said: "I never told him he should plead guilty, nor did I tell him not to plead guilty."
They then had a meeting at Cafe Rouge in Wimbledon on August 14 2006.
He said: "I told him my view was this did not have to mean the end of his professional life as a journalist."
Coulson said he did tell Goodman he had "gone off the reservation", adding: "I think it's an accurate description of how I felt Clive had behaved. I knew enough to know he had gone behind my back."
But the former editor denied describing him as a "lone wolf" or suggesting that he could use his influence in the case.
When quizzed by his lawyer, Timothy Langdale QC, Coulson said: "The anti-terrorist police had come on to the newsroom floor. I had a reporter charged. It was a major crisis for the paper. I was feeling many things but I was not being influential, put it that way."
Coulson said he asked an executive if hacking had been involved in producing tapes he had heard two years earlier which revealed then home secretary David Blunkett's affair with Spectator publisher Kimblerly Quinn.
He said: "I asked quite soon after Clive Goodman had been arrested and released and we knew the identity of Glenn Mulcaire and Nine Consultancy.
"I asked if Nine Consultancy had been involved in the Blunkett story in any way and the answer came back 'No'."
Coulson, of Charing, Kent, denies conspiring to hack phones and commit misconduct in a public office. All seven defendants deny the charges against them.
Coulson told the court that between Goodman's guilty plea in December 2006 and sentencing on January 26 2007, the mood changed and the NI lawyer became "increasingly suspicious" that he might implicate his editor in hacking.
Meanwhile, Coulson had decided to give up the editorship during the Christmas break.
He said: "I felt I was the boss, I was in charge and ultimately responsible, and I should resign."
On the day Goodman and Mulcaire were jailed, the resignation was announced.
Coulson went on to become David Cameron's director of communications at Downing Street.
But in January 2011, Coulson said he had to make a decision to resign again amid media coverage of phone hacking at NotW.
He met Rebekah Brooks at a London hotel two weeks before handing in his notice to "catch up".
At the time he said he was "feeling pretty sorry" for himself having spent another Christmas considering his resignation.
But he did not tell Brooks of his plan, he said: "I was very clear in my mind the first person who should hear that was the Prime Minister."