The Duke of Sussex has accepted damages and an apology from a news agency which used a helicopter to take photographs of his home in the Cotswolds.
Prince Harry’s lawyers told a High Court hearing the pictures taken by Splash News and Picture Agency included one of the inside of a bedroom at the privately-rented Oxfordshire property.
The court heard the pictures had “seriously undermined” Harry’s safety.
Splash said it had made an “error of judgement” which would not be repeated.
In a statement, it added: “We apologise to the Duke and Duchess (of Sussex) for the distress we have caused.”
Buckingham Palace said the duke “acknowledges and welcomes the formal apology” from Splash.
The court heard the photos, which were “published by the Times newspaper and elsewhere online”, were of living and dining areas, and included a shot taken “directly into the bedroom”.
The duke’s lawyers told Mr Justice Warby that Harry and his wife Meghan had chosen to make the Oxfordshire property their home because of its “high level of privacy”.
But Gerrard Tyrrell, who read a statement in court on the duke’s behalf, said the couple had subsequently felt unable to live there.
When the photos were published in mid-January, the couple’s official residence was Kensington Palace.
But a spokeswoman for the Sussexes said they had spent a lot of time at their country retreat in the Cotswolds, which had been privately rented by Harry.
The duke and duchess moved from Kensington Palace to Frogmore Cottage, Windsor, in April – shortly before Meghan gave birth to their son Archie.
Mr Tyrrell said Splash had agreed to pay a “substantial” sum of damages and legal costs to settle the privacy and data claims faced by the agency.
He added Splash would “not repeat its conduct by using any aerial means to take photographs or film footage of the duke’s private home, which would infringe privacy or data rights or otherwise be unlawful activity”.