A High Court judge has said Andrew Mountbatten-Windsor and Thames Valley Police have agreed the search warrants that allowed officers to raid two of his properties earlier this year were unlawful.
But the criminal investigation into the former Duke of York is ongoing, while further legal proceedings will decide whether police can keep hold of evidence seized during the searches.
The former prince launched a legal challenge to quash the warrants - issued by an Old Bailey judge on 18 February last year - which allowed police to raid Andrew's residence on the Sandringham estate and his former Windsor home, Royal Lodge.
Andrew was arrested the following day, on his 66th birthday, on suspicion of misconduct in public office following allegations he shared sensitive information with Jeffrey Epstein during his time as the UK's trade envoy.
At a hearing at the Royal Courts of Justice on Thursday, which Andrew did not attend, Mr Justice Hilliard said that "agreement was reached between the claimant and Thames Valley Police that the search warrants were unlawful".
He said a "significant error was made in the application for and grant of the search warrants," which was "enough to render the warrants, the searches and the material seized unlawful".
The court heard officers "took possession of documentary material and electronic devices", but the judge said "there would be little point handing it back if it could be lawfully seized on some other provision".
"The fact that the search warrants were quashed does not bring an investigation to an end, or mean that the whole of the investigation was unlawful," he added.
Police have launched a bid to retain evidence gathered during the searches, which the judge said is opposed by Andrew, with a hearing to be held in private in 2027.
Andrew, who now lives on the King's private Sandringham estate in Norfolk, was interviewed under caution on February 19 before being released under investigation, and denies wrongdoing.
Police began their searches of the properties on the same day, with the force confirming on 24 February they had ended.
More from Sky News:
Royal Navy serviceman accused of plotting Russia information leak
Sisters pulled from sea near Brighton took own lives, inquest finds
It is understood police applied for warrants under Sections 8 and 9 the Police and Criminal Evidence Act, which regulates police powers, but an Old Bailey judge decided warrants were only needed under Section 8.
But after Andrew launched his legal action, it was agreed the warrants should've been granted under Section 9, which includes items covered by legal privilege, or "excluded material", including business records and confidential journalistic material.
The agreement was formalised on 22 July, but has only now been made public following a hearing which had been expected to deal with a bid by police to restrict access to documents in the legal claim.
But Mr Justice Hilliard said police indicated that they no longer pursued the matter on Wednesday afternoon, subject to certain information being redacted, such as the names of individual officers.
A TVP spokesperson said the agreement that led to the quashing of the warrants "relates specifically to a decision made by the court regarding the legal basis for these and is not a judgement on our ongoing investigation".
"Legal proceedings are currently ongoing to decide how material seized during the searches will be managed and whether we can lawfully retain it in support of our ongoing investigation," they said.
"Our investigation into alleged misconduct in public office by a man in his 60s from Norfolk remains ongoing, and we continue to pursue all reasonable lines of enquiry to effectively and fairly progress this investigation."
Charles stripped his brother of both his right to be a prince and his dukedom late last year over his association with convicted sex offender Epstein.
Andrew receives an annual stipend - the amount of which has not been disclosed - provided by the King from his private funds, but a palace source said on Monday it has been made clear that these monies should not be used to fund the judicial review.
A National Police Chiefs' Council spokesperson said a small national team is working to review material related to the Epstein files, while all 43 forces in England and Wales are cooperating on intelligence assessments.
Along with TVP, the Metropolitan Police and Surrey Police also have live ongoing investigations.
"Identifying any further potential offending, suspects, victims or witnesses is a complex process and will take time, but UK policing remains committed to carrying out a meticulous assessment of the material released by the US Department of Justice," the spokesperson said.
(c) Sky News 2026: Warrants used to raid two of Andrew Mountbatten-Windsor's homes were unlawful
Two Latvian nationals arrested on suspicion of trespassing at RAF base
OpenAI sparks 'mathpocalypse' as it publishes full or partial solutions to 372 outstanding problems
Airlines suspend flights to Saudi capital after Houthis claim attack on airport