Sir Cliff Richard has agreed a final settlement with the BBC and will receive around £2 million towards his legal costs.
The singer, 78, sued the broadcaster over its coverage of the police search of his Berkshire home in 2014.
The judge ruled in the singer's favour last year, awarding him £210,000 in damages.
Sir Cliff told the trial he had spent more than £3 million on the case.
Following the final settlement, a spokesman for the singer said he was still "substantially out of pocket".
A statement said: "Sir Cliff incurred these costs over a five-year period as a direct result of the actions of the BBC and South Yorkshire Police.
"He is of course glad that an agreement about costs has now been reached.
"Ultimately, however, Sir Cliff is substantially out of pocket (a seven figure sum), not least because there are costs that he has not sought to recover from the parties."
The BBC also paid £315,000 to South Yorkshire Police for legal costs.
A BBC spokeswoman said: "We are pleased that Sir Cliff Richard, the BBC and South Yorkshire Police have reached an amicable settlement of Sir Cliff Richard's legal costs.
"The BBC's costs are within the scope of our legal insurance. This brings the legal process to its conclusion."
The pop star has previously told how the trauma of BBC coverage of the police search of his home, following a claim of historical sexual assault, left him emotionally drained.
Sir Cliff was not arrested and did not face charges.
He later said: "They smeared my name around the world."
He added: "I've had four terrible years and it was horrific... I would never wish that on my worst enemy. It was tumultuous, horrific, emotionally draining, traumatic."
Earlier this year, Sir Cliff launched a petition so that those accused of sexual offences remain anonymous until charged.