A new law to tackle online piracy has been backed by the High Court despite fears it could lead to millions of innocent people having their privacy invaded.
Web piracy is thought to cost the UK economy £400m a year
The Digital Economy Act 2010 is aimed at clamping down on illegal internet file-sharing and protecting intellectual property rights on the web.
Copyright infringements online are thought to cost the UK economy £400m a year, and supporters of the legislation said they were "delighted" with the ruling by the judge Mr Justice Parker.
They said it would be a major boost to people in the creative industries whose livelihoods were put at risk because their output was being stolen "daily".
The judge rejected claims by BT and TalkTalk, two of the UK's largest internet service providers (ISPs), that the Act was seriously flawed and "incompatible" with European law.
The two ISPs had argued that measures introduced under the Act would unlawfully "impact on the privacy and free expression rights" of consumers, and interfere with customer relationships.
BT and TalkTalk also said the new law, brought in by the Business Secretary Vince Cable, could potentially putting the privacy of millions of innocent customers at risk.
They also challenged the legality of the statutory order, currently before Parliament in draft form, designed to regulate sharing the costs of implementing the new legislation.
Campaigners say the new law puts privacy at risk
But Mr Justice Parker dismissed all the claims, except for one relating to the costs order, when he removed the ISPs' obligation to pay 25% of watchdog Ofcom's costs and the costs of establishing an appeals body.
The new legislation went through in the final days of the last Labour government.
It was first mooted by then business secretary Lord Mandelson who launched a crackdown just days after spending time on the yacht of a leading critic of illegal file sharing, record label founder David Geffen.
The coalition decided not to repeal it and is now working on implementing elements of the Act.
A spokesman for the Department for Culture, Media and Sport said: "We are pleased that the court has recognised these measures as both lawful and proportionate.
"The Government remains committed to tackling online piracy and so will set out the next steps for implementation of the Digital Economy Act shortly."
A BT spokesman said: "We are disappointed with the outcome of the judicial review. We are reviewing this long and complex judgment.
"Protecting our customers is our number one priority and we will consider our options once we have fully understood the implications for our customers and businesses.
"This was always about seeking clarity on certain points of law and we have to consider whether this judgment achieves these aims."