South Yorkshire Police have agreed to pay Sir Cliff Richard "substantial" damages after the singer sued following BBC reports naming him as a suspected sex offender, a High Court judge has been told.

A barrister heading the singer's legal team gave detail of the terms of a settlement to Mr Justice Mann at a High Court hearing in London on Friday.

Justin Rushbrooke QC did not say how much the force had agreed to pay.

Sir Cliff had sued South Yorkshire Police, and the BBC, over coverage of a raid at his apartment in Sunningdale, Berkshire, in August 2014.

He had alleged misuse of private information, infringement of his human right to respect for private life and a breach of data protection legislation.

Mr Rushbrooke said Sir Cliff and the BBC remained in dispute.

But he said South Yorkshire Police had agreed to pay "substantial damages" to compensate for "unlawful" conduct.

He said South Yorkshire Police should not have made disclosures about the investigation into Sir Cliff to the BBC and should not have co-operated with the BBC in the way that they did.

Their actions had facilitated BBC coverage which had been "shocking, humiliating and embarrassing" for Sir Cliff and the singer's reputation had been "forever tainted", said Mr Rushbrooke.

Barrister Adam Wolanski, who represented South Yorkshire Police, said force bosses accepted that Sir Cliff's private information should not have been disclosed to the BBC.

Bosses acknowledged that the force's conduct had been unlawful and offered "sincere apologies" for the "distress and humiliation" Sir Cliff had suffered, Mr Wolanski told the judge.

Mr Justice Mann has heard that in late 2013 a man made an allegation to the Metropolitan Police, saying he had been sexually assaulted by Sir Cliff at Sheffield United's Bramall Lane football stadium when a child in 1985.

Metropolitan Police officers passed the allegation to South Yorkshire Police in July 2014.

Sir Cliff had denied the allegation and in June 2016 prosecutors announced that he would face no charges.

He subsequently launched legal action.

South Yorkshire Police had already apologised ''wholeheartedly for the additional anxiety caused'' by the force's ''initial handling of the media interest'' in its investigation into the singer.

BBC editors have said they will "defend ourselves vigorously''.

Background

Mr Rushbrooke said police had indicated that they had co-operated with the BBC, after a reporter said he was aware of an investigation into Sir Cliff, in an bid to protect the "integrity" of their inquiry.

"South Yorkshire Police may have intended to protect the integrity of its investigation, as it claims, but it should not have made the disclosures to the BBC and co-operated with the BBC in the way that it did," he said.

"South Yorkshire Police's actions facilitated the BBC's coverage, which caused such significant distress to (Sir Cliff).

"These events have had a devastating effect on (Sir Cliff): the BBC's coverage of the search was shocking, humiliating and embarrassing for him and attracted immediate worldwide attention, as a result he suffered profound and long-lasting damage and distress, and his reputation has been forever tainted."

Mr Rushbrooke said police bosses had agreed to pay an "appropriate" sum to cover lawyers' bills run up by Sir Cliff.