The US Supreme Court has ruled that file-sharing companies are to blame for what users do with their software.
Millions of people swap music via file-sharing networks
The surprise ruling could start a legal assault on the creators of file-sharing networks such as Grokster and Morpheus.
The case was brought by 28 movie and music makers who claimed that rampant piracy was denting profits.
The Supreme Court judges were expected to rule in favour of the file-sharers because of legal precedents set when video recorders first appeared.
The unanimous ruling is a victory for recording companies and film studios in what is widely seen as one of the most important copyright cases in years.
Andrew Lack, chief executive of Sony BMG, said his company would pursue those who failed to comply with the law.
"The court made it very clear that we can go after damages and that we can chase them out," Mr Lack told BBC World's World Business Report.
"We will do that if necessary, but my hope is that we will find new bridges to legitimise a lot of services that formerly were confused about what was right and wrong, legal and illegal."
The legal case against Streamcast Networks - which makes the software behind Grokster and Morpheus - began in October 2001 when 28 media companies filed their legal complaint.
The complaint alleged that Streamcast was prospering on the back of the unfettered piracy taking place on the file-sharing networks.
However, the attempts to win damages suffered a series of defeats as successive courts sided with the file-sharing networks. The judges in those lower courts cited a ruling made in 1984 over Sony's Betamax video recorder.
In that case, the Supreme Court said that the majority of people using a video recorder for legal uses outweighed any illegal use of the technology.
But in this latest ruling the judges set aside the lower court decisions. It means the makers of a technology have to answer for what people do with it if they use it to break the law.
In the ruling Justice David Souter wrote: "The question is under what circumstances the distributor of a product capable of both lawful and unlawful use is liable for acts of copyright infringement by third parties using the product."
He added: "We hold that one who distributes a device with the object of promoting its use to infringe copyright ... is liable for the resulting acts of infringement by third parties."
Reaction to the ruling was swift.
Dan Glickman, president of the Motion Picture Association of America, said: "Today's unanimous ruling is an historic victory for intellectual property in the digital age, and is good news for consumers, artists, innovation and lawful Internet businesses."
John Kennedy, head of the International Federation of the Phonographic Industry said: "It quite simply destroys the argument that peer-to-peer services bear no responsibility for illegal activities that take place on their networks."
In other decisions on Monday, the Supreme Court:
The rulings came on the last day of the US Supreme Court's current judicial session. It now breaks for a three-month recess.
- ruled against the display of the Ten Commandments inside two Kentucky courtrooms but approved a monument to the same in Texas
- declined to hear appeals by two US journalists facing a contempt ruling by a lower court over their investigation into an alleged White House intelligence leak
- overturned a ruling that cable operators' high-speed internet lines must be opened up to rivals.
One expected announcement that did not appear concerned the retirement of 80-year-old Chief Justice William Rehnquist.
Justice Rehnquist is suffering from thyroid cancer, breathes through a tracheal tube and struggled to talk during a speech closing the current court term that thanked court workers.
In its ruling the Supreme Court said there was "substantial evidence" that Streamcast Networks had "induced" people to use its software to illegally share copyrighted files.
It is unclear yet what action this ruling will prompt from movie studios and music makers who brought the original case. It could mean claims for substantial damages from Streamcast or moves to get the file-sharing networks shut down.
Wayne Rosso, former Grokster president and now head of legal file-sharing system Mashboxx, said: "If I'm running the RIAA [Recording Industry Association of America], you're going to see lawsuits coming down like a Texas hailstorm. Don't be surprised to see an unusually large number filed immediately."
It is unclear what effect the ruling will have on use of digital media
He said it would mean that users would have to get used to paying for music.
Michael McGuire, from analyst firm GartnerG2, said: "It's something of a surprise. It will be interesting to see how record labels respond. It could be argued that these peer-to-peer services were the most efficient way to deliver rich media."
The decision could also have an impact on any technology firm developing gadgets or devices that let people enjoy media on the move.
If strictly interpreted the ruling means that these hi-tech firms will have to try to predict the ways people can use these devices to pirate copyrighted media and install controls to stop this infringement.
The ruling could also prompt a re-drafting of copyright laws by the US Congress.