WELLINGTON, New Zealand (AP) — Kim Dotcom, founder of the once wildly popular file-sharing website Megaupload, lost a 12-year fight this week to halt his deportation from New Zealand to the U.S. on charges of copyright infringement, money laundering and racketeering.

New Zealand’s Justice Minister Paul Goldsmith divulged Friday that he had decided Dotcom should be surrendered to the U.S. to face trial, capping — for now — a drawn-out legal fight.

A date for the extradition was not set, and Goldsmith said Dotcom would be allowed “a short period of time to consider and take advice” on the decision. “Don't worry I have a plan,” Dotcom posted on X this week. He did not elaborate, although a member of his legal team, Ira Rothken, wrote on the site that a bid for a judicial review — in which a New Zealand judge would be asked to evaluate Goldsmith's decision — was being prepared.

The saga stretches to the 2012 arrest of Dotcom in a dramatic raid on his Auckland mansion, along with other company officers. Prosecutors said Megaupload raked in at least $175 million — mainly from people who used the site to illegally download songs, television shows and movies — before the FBI shut it down earlier that year. Lawyers for the Finnish-German millionaire and the others arrested had argued that it was the users of the site, founded in 2005, who chose to pirate material, not its founders.

But prosecutors argued the men were the architects of a vast criminal enterprise.