The BBC is to pay damages to the ex-nanny to Princes William and Harry over false claims made about her to obtain a 1995 Princess Diana interview.
Alexandra Pettifer, known as Tiggy, received an apology at the High Court over totally unfounded claims she had had an affair with the Prince of Wales.
Her solicitor said the false claims had caused “serious personal consequences”.
A probe has already found Panorama’s Martin Bashir used fake documents to gain access to Diana.
An agreed statement read out in court said the false claims about Ms Pettifer had included “the very serious and totally unfounded allegations that the claimant was having an affair with HRH Prince of Wales”.
“It is likely that these false and malicious allegations arose as a result and in the context of BBC Panorama’s efforts to procure an exclusive interview with Diana, Princess of Wales,” the statement said.
In it, Louise Prince, on behalf of Ms Pettifer, said the former nanny was “relieved that the BBC accepts that the allegations are completely untrue and without any foundation whatsoever”.
The solicitor also said Ms Pettifer was “pleased that the BBC has agreed to apologise unreservedly… in order to assist her in repairing the substantial harm it has caused her”.
The corporation will pay her a substantial, undisclosed sum and her legal costs.
Following the hearing, BBC director-general Tim Davie said the corporation apologised to Ms Pettifer, the Prince of Wales, and Princes William and Harry “for the way in which Princess Diana was deceived and the subsequent impact on all their lives”.
He added: “Now we know about the shocking way that the interview was obtained, I have decided that the BBC will never show the programme again; nor will we license it in whole or part to other broadcasters.
“It does of course remain part of the historical record and there may be occasions in the future when it will be justified for the BBC to use short extracts for journalistic purposes, but these will be few and far between and will need to be agreed at executive committee level and set in the full context of what we now know about the way the interview was obtained.
“I would urge others to exercise similar restraint.”