Britain's Prince Harry has accepted "substantial damages" and an apology from a news agency after photos were taken of his home from a helicopter.
According to his lawyers, the photos showed the Oxfordshire home's interior and "very seriously undermined" his safety.
The photos, which were taken in January by Splash News and Picture Agency, showed the living area, dining area and "directly into the bedroom", London's High Court heard.
They were published in The Times newspaper in the UK and elsewhere online.
Barrister Gerrard Tyrrell told the court that Prince Harry and his wife Meghan Markle had chosen the home because of privacy it offered.
He said: "The syndication and publication of the photographs very seriously undermined the safety and security of the Duke and the home to the extent that they are no longer able to live at the property.
"The property had been chosen by the Duke for himself and his wife given the high level of privacy it afforded given its position in a secluded area surrounded by private farmland away from any areas to which photographers have access."
Splash said it had "always recognised that this situation represents an error of judgement and we have taken steps to ensure it will not be repeated".
"We apologise to the duke and duchess for the distress we have caused."
Mr Tyrrell said the agency had promised to "cease and desist from selling, issuing, publishing or making available the photographs".
It also said it "will 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".
In a statement, Buckingham Palace said Harry "acknowledges and welcomes the formal apology from Splash News and Picture Agency".