A BBC reporter who covered a South Yorkshire Police search of Sir Cliff Richard's home texted a force press officer about a "bonkers but brilliant" day, a High Court judge has been told.
The press officer replied saying she was getting "lots of grief from the media" because "everyone thinks we tipped you off".
Detail of the text conversation between journalist Dan Johnson and Carrie Goodwin, head of corporate corporate communications at South Yorkshire Police, emerged as Mr Justice Mann analysed evidence during the latest stage of a High Court trial in London.
A barrister representing the BBC outlined the message exchange as he questioned Ms Goodwin.
Sir Cliff has told the judge how BBC coverage of a police raid on his home left him feeling "forever tainted".
The 77-year-old singer has told how seeing coverage of the search at his apartment in Sunningdale, Berkshire, nearly four years ago was like "watching burglars" going through his belongings.
He said he felt that his name had been "smeared" all over the world, he said his health had suffered, he said he had never lived in the apartment again because it had become "contaminated", and he said he wanted a public declaration that what the BBC did was "wrong".
Sir Cliff has taken legal action over BBC coverage of the police search, which was staged after a sex assault allegation, and wants damages at the "top end" of the scale.
He says 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 a the trial last Thursday.