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 yesterday.
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 that Sir Cliff and the BBC remained in dispute.
But the lawyer said South Yorkshire Police had agreed to pay “substantial damages” to compensate for “unlawful” conduct.
Mr Rushbrooke 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.
The force’s actions had facilitated BBC coverage which had been “shocking, humiliating and embarrassing” for Sir Cliff, said Mr Rushbrooke, who added that the singer’s reputation had been “forever tainted”.
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.
Sir Cliff had denied the allegation against him and in June 2016 prosecutors announced that he would face no charges.
A spokeswoman said the BBC had reported Sir Cliff’s “full denial of the allegations at every stage”.