WELLINGTON (Reuters) - Internet entrepreneur and Megaupload founder Kim Dotcom can be extradited to the United States to face racketeering and criminal copyright charges, New Zealand’s Court of Appeal ruled on Thursday.

It upheld a lower court ruling in 2017 that the extradition could take place, and set the stage for Dotcom’s final appeal to the Supreme Court, the country’s highest judicial body.

The six-year legal saga is widely seen as a test for how far the United States can reach globally to apply American firms’ intellectual property rights.

“My legal team are confident that the Supreme Court will hear the appeal given there are such significant legal issues at stake,” Dotcom said in a statement.

U.S. authorities say Dotcom and three co-accused Megaupload executives cost film studios and record companies more than $500 million and generated more than $175 million in revenue by encouraging paying users to store and share copyrighted material.

The Court of Appeal said the United States had disclosed “a clear prima facie case that the appellants conspired to, and did, breach copyright wilfully and on a large scale, for their commercial gain.

“An extradition hearing is not a trial. It is held to decide whether there is sufficient evidence to commit a person for trial on a qualifying offence,” the court said in its ruling.

Dotcom disputed the court’s interpretation of copyright provisions.

“The precedent set is concerning and has ramifications in New Zealand outside my case,” he said.

Dotcom’s lawyers have argued in previous court cases that copyright infringement is not a criminal offense in New Zealand and that there was not enough evidence that Dotcom and other Megaupload executives conspired to commit a crime.

If the Supreme Court accepts the case, it would be the final appeal through the courts for Dotcom.

However his battle to avoid being sent to the United States could continue as Justice Minister would have to approve the extradition and that decision could be subject to further court reviews.

German-born Dotcom, who has New Zealand residency, became well known for his lavish lifestyle as much as his computer skills.

He used to post photographs of himself with cars and vanity license plates such as “GOD” and “GUILTY”, shooting an assault rifle and flying around the world in his private jet.

Dozens of black-clad police raided Dotcom’s mansion in 2012, breaking him out of a safe room and confiscating millions of dollars in cash and property, including a fleet of luxury cars, computers and art work.