One of Sir Cliff Richard's solicitors has told a High Court judge how the singer faced a "crisis situation" following a BBC broadcast of a police search of his home.
Gideon Benaim, who works for law firm Simkins, told Mr Justice Mann how Sir Cliff asked lawyers to take what reasonable steps they could to prevent "consequent damage".
He said he thought the police investigation would have been shorter if the BBC journalists had not covered events in the way they did.
Sir Cliff has taken legal action against the BBC over coverage of the South Yorkshire Police search of his apartment in Sunningdale, Berkshire, which was staged after a sex assault allegation in August 2014, and wants damages at "top end" of the scale.
He said the coverage was a "very serious invasion" of his privacy.
The BBC disputes his claims.
Bosses say coverage of the search was accurate and in good faith.
Mr Justice Mann began overseeing the trial, at the High Court in London, last Thursday.
The judge has heard that the police inquiry lasted nearly two years following the search in August 2014.
Sir Cliff was not arrested and prosecutors announced that he would not be charged in the summer of 2016.
Mr Benaim said lawyers did their best to "mitigate the damage" following the BBC broadcast.
"Quite clearly, but for the BBC actions on the day, there would have been no need for vast amount of work we did for (Sir Cliff)," Mr Benaim said in a witness statement.
"In all likelihood we would have just carried on advising the client in the same low-level and intermittent basis we had been advising him on before August 14 2014."
He added: "There were approximately 13,000 emails exchanged in relation to the matter between August 2014 and June 2016, which highlights the sheer volume of work that this firm undertook for (Sir Cliff) during the period."
Mr Benaim said Sir Cliff had been in a "crisis" situation.
He said: "We worked throughout the period alongside Sir Cliff's PR advisers, which is an entirely normal practice and indeed necessary in crisis situations, which is clearly what Sir Cliff found himself in due to the BBC's actions."
Sir Cliff said nothing to waiting journalists as he arrived at the hearing on Wednesday.
The BBC reporter who broke the story about Sir Cliff's home being searched is preparing to give evidence.
Dan Johnson is scheduled to answer questions from lawyers representing Sir Cliff on Wednesday afternoon.