Sir Cliff Richard was mistreated by police and the BBC in reporting about a child sex abuse investigation into the veteran entertainer, a confidential report has found.

The Summer Holiday singer had his privacy violated by a deal between South Yorkshire Police and the broadcaster said former chief constable Andy Trotter.

Camera crews camped outside his home while officers searched it after a complaint was made against Richard in 2014. Police tipped off the BBC about the operation before it took place.

The 74-year-old singer complained the police did not inform him of the search and he only found out about it by watching BBC News. Trotter said the conduct caused Richard "unnecessary distress" and "interfered with his privacy".

"More importantly, people have seen a search on Sir Cliff Richards's apartment unfold on television with details of a serious allegation put into the public domain prior to him being interviewed by the police," the former top police officer said.

Trotter's report for South Yorkshire Police was made public by a Freedom of Information request from the Daily Mail.

Bad publicity for police and BBC

Elsewhere in the document, Trotter wrote: "Whatever the motivation and good intentions of those involved from SYP, the outcome has been bad publicity for the force, the Chief Constable being summoned to HASC [Britain's home affairs select committee], criticism from the media and politicians, complaints from the public, abuse on social media and a public spat with the BBC."

The incident dealt a credibility blow to the police, he concluded. "The force can argue that the search was carried out successfully and there was no interference to the investigation that the threat of prior publication was avoided," Trotter said. "That is true but at considerable cost to the reputation of the force which could have been avoided by the individuals concerned."

Richard refused to comment on the report. He strenuously denies the allegation he molested a boy at a Christian event in Sheffield in 1985.

The BBC defended its reporting of the investigation. A spokesman said: "'The home affairs committee has already endorsed the way the BBC handled this story. We have nothing further to add."

South Yorkshire Police said it would act upon Trotter's report.