The Pirate Bay, one of the last surviving file-sharing websites, is in peril after judges at the European Union's top court warned that giving users free access to a trove of Hollywood movies, TV shows and music risks breaking the law.

"Making available and managing an online platform for sharing copyright-protected works, such as 'The Pirate Bay,' may constitute an infringement of copyright," the Luxembourg-based EU Court of Justice said Wednesday in a decision that may set a precedent in the music and film industries' fight to stem piracy.

Since its inception in 2003, Pirate Bay has withstood pressure to permanently shut its virtual doors, despite police raids and the imprisonment of its founders. In May, one of the largest alternatives to Pirate Bay, ExtraTorrent, unexpectedly shut itself down leaving a message on its homepage that it would "permanently erase" its own data. It followed the voluntary closure in 2016 of high-profile website TorrentHound, another go-to alternative to Pirate Bay that dated back to 2006.