Kim Dotcom, the controversial Internet entrepreneur and founder of Megaupload, can claim another victory in his ongoing legal battles. A New Zealand judge ordered on Thursday that police must sift through the digital information seized in a raid of Dotcom’s home and return any information not directly related to their investigation. Additionally, the judge ruled that the FBI must ship back all cloned hard drives and destroy copies that the U.S. government archived.

At the request of the FBI, New Zealand police raided Dotcom’s mansion and seized hard drives filled with an estimated 150 terabytes of both personal information and data related to Megaupload. Copies of the hard drives were sent to the FBI. Nearly a year ago, Judge Helen Winkelmann, chief justice of New Zealand’s High Court, ruled that the raid on Dotcom’s mansion was illegal on the basis of the warrants being too broad.

"The warrants could not authorize the permanent seizure of hard drives and digital materials against the possibility that they might contain relevant material, with no obligation to check them for relevance," Winkelmann wrote.

Since that ruling, Dotcom’s legal team has been trying to get the court to order the return of Dotcom’s personal data and information. Friday’s ruling granted the team’s request, forcing the police, at their own expense, to go through the data and distinguish between personal property and information that’s relevant to the ongoing investigation.

Winkelmann added that the vague warrants also did not permit the police to ship the 150 terabytes of data to the FBI.

"They could not authorize the shipping offshore of those hard drives with no check to see if they contained relevant material,” Winkelmann wrote. “Nor could they authorize keeping the plaintiffs out of their own information, including information irrelevant to the offences."

Dotcom took to Twitter to celebrate his victory, IBTimes asked Dotcom what sort of data he expects to have returned, and whether or not he trusts the U.S. government to destroy all archived copies of the data. At the time of writing, we have not received a response. 

Follow Ryan W. Neal on Twitter