London (CNN) — Prince Harry’s yearslong legal battle against Rupert Murdoch’s British newspaper group took an unexpected turn on Wednesday, after the duke settled his case over allegations of unlawful information gathering shortly before the trial was due to get underway.

The Duke of Sussex, 40, had sued News Group Newspapers (NGN) – publisher of British tabloids The Sun and the now-shuttered News of the World – claiming journalists and private investigators working for the publications had targeted him and his family between 1996 and 2011.

David Sherborne, the duke’s barrister, told London’s High Court on Wednesday that NGN “offers a full and unequivocal apology to the Duke of Sussex for the serious intrusion by The Sun between 1996 and 2011 into his private life, including incidents of unlawful activities carried out by private investigators working for The Sun.”

Reading out the full statement on behalf of the defendant, Sherborne said NGN also offered an apology to the royal “for the phone hacking, surveillance and misuse of private information by journalists and private investigators instructed by them at the News of the World.”

“NGN further apologizes to the duke for the impact on him of the extensive coverage and serious intrusion into his private life as well as the private life of Diana, Princess of Wales, his late mother, in particular during his younger years,” Sherborne told the court.

“We acknowledge and apologize for the distress caused to the duke, and the damage inflicted on relationships, friendships and family, and have agreed to pay him substantial damages. It is also acknowledged, without any admission of illegality, that NGN’s response to the 2006 arrests and subsequent actions were regrettable,” he continued.

His fellow claimant, ex-lawmaker and former Labour Party deputy leader Tom Watson, who also settled, had alleged that the tabloids engaged in unlawful information gathering and phone hacking between 2009 and 2011.

Watson has previously said he was targeted around the time he was investigating the Murdoch newspapers during a high-profile phone hacking scandal, which led to the 2011 closure of News of the World and forced Murdoch to apologize for phone hacking.

Harry’s barrister also told the court that NGN apologized to his co-claimant Watson, for “unwarranted intrusion carried out into his private life during his time in government by the News of the World during the period 2009- 2011.”

Proceedings at London’s High Court had been due to start Tuesday morning but were repeatedly delayed after requests by lawyers from both sides.

(Copyright (c) 2024 CNN. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed.)

Join our Newsletter for the latest news right to your inbox