BT and TalkTalk have lost their Court of Appeal challenge against government moves to tackle copyright infringement online.
They asked three appeal judges to overturn a High Court ruling backing controversial measures intended to curb illegal internet file-sharing.
The creative industries estimate the practice is costing them some £400m a year, especially with regard to films, music and books.
BT and TalkTalk, which are two of the UK's largest internet service providers (ISPs), say the proposed measures are incompatible with EU law.
Their lawyers also argued at an appeal court hearing in January that the measures would result in an invasion of privacy and run up disproportionate costs for ISPs and consumers.
On Tuesday, Lady Justice Arden, sitting with Lord Justice Richards and Lord Justice Patten, disagreed and dismissed their appeal.
High Court judge Mr Justice Kenneth Parker rejected the challenge in April last year.
The appeal judges ruled on Tuesday that he had reached the correct decision, his ruling was "soundly based" and there was no need to refer the case to the European Court of Justice for a final ruling.
The High Court judge had declared the proposals under the Digital Economy Act 2010 a proportionate parliamentary response to the serious economic problem of peer-to-peer file-sharing, and the likely costs were justified.
He upheld submissions made by lawyers for the Department for Culture, Media and Sport (DCMS) that there were sufficient safeguards to protect the rights of consumers and ISPs.
Lawyers for BT and TalkTalk unsuccessfully asked the appeal court to rule that the High Court had "erred in law", and the contested provisions were incompatible with a number of EU directives related to "electronic commerce".
The ruling was welcomed by employers and unions in the creative industries, who say copyright infringement - online "piracy" - is taking place on "a massive scale", costing millions and threatening livelihoods.
John McVay, chief executive of the Producers Alliance for Cinema and Television (Pact), said: "We always believed that the judicial review was misconceived.
"Rather than needlessly spending more time and money on further legal challenges, BT and TalkTalk now need to focus on working with (copyright) rights holders and the Government in implementing the Digital Economy Act (DEA) with immediate effect."
Actors' union Equity also called on BT and TalkTalk to "stop fighting and start obeying the law".
General secretary Christine Payne said: "Once again the court is on the side of the almost two million workers in the creative industries whose livelihoods are put at risk because creative content is stolen on a daily basis."
Lord Puttnam, president of the Film Distributors' Association, said: "Hopefully this brings to an end a long chapter of uncertainty, and the DEA can now help in implementing a mass consumer education programme so that people, especially young people, can come to appreciate the damage piracy inflicts on the whole of the creative community."