The Duke of Sussex has accepted substantial damages and an apology from a news agency which took pictures of his Cotswolds home from a helicopter.
Harry settled privacy and data protection claims against Splash News and Picture Agency over photographs "of and into the living area and dining area of the home and directly into the bedroom", the High Court in London heard on Thursday.
The duke's lawyers told Mr Justice Warby that the pictures, which were "published by the Times newspaper and elsewhere online", had "very seriously undermined the safety and security of the duke and the home".
Gerrard Tyrrell, reading a statement in open court on the duke's behalf, said Harry and his wife the Duchess of Sussex had chosen the home in Oxfordshire because of "the high level of privacy it afforded", but now felt "they are no longer able to live at the property".
The barrister said Splash "has agreed to pay a substantial sum in damages and legal costs, and has apologised to the duke".
Mr Tyrrell added that the agency had given an undertaking to "cease and desist from selling, issuing, publishing or making available the photographs" and also that 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".
Splash said in a statement: "Splash has always recognised that this situation represents an error of judgment 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."