The British government's "snooper's charter" appears to go against major European judgements that forbid mass surveillance, according to the United Nations' top expert on privacy, Joseph Cannataci.
Cannataci, the UN's "special rapporteur" on the subject, issued a report on Wednesday that said the U.K. government seemed not to appreciate "the serious and possibly unintended consequences of legitimizing bulk interception and bulk hacking." He urged the government to step back and set a better example to other countries.
The Investigatory Powers Bill would force British Internet service providers to keep logs of all the websites people visit and all the calls they make. It would allow the government to hack many people's computing devices at once, force organizations to hand over bulk datasets on their customers, and make tech firms remove encryption on their products when asked to do so.
The judgements Cannataci referred to were those of the European Court of Justice (ECJ) in the Schrems case, and the European Court of Human Rights (ECtHR) in the Zakharov case.
Get Data Sheet, Fortune’s technology newsletter.
The Schrems judgement is pretty well known—that was where the EU's highest court struck down the EU-U.S. Safe Harbor data-transfer agreement, partly because of the U.S. PRISM mass surveillance program. In the ruling, the ECJ said any non-targeted surveillance program giving authorities "generalized" access to people's data must by definition violate the right to privacy.
The Zakharov ruling, which came through in early December, is perhaps less well-known. It concerned Council of Europe member Russia, which runs a deeply intrusive surveillance apparatus called SORM that gives the authorities direct access to everyone's communications.
The ECtHR ruled even more explicitly than the ECJ, declaring the illegality of any system that gives the security services and police the "technical means to circumvent the authorization procedure and to intercept any communications without obtaining prior judicial authorization." Such systems are open to abuse, the court said.
The British government took into account reports from three parliamentary committees on its draft Investigatory Powers Bill, before producing the finished product this month. According to Cannataci, those proposals still "fail the benchmarks" set by the ECJ and ECtHR.
Cannataci encouraged the parliamentary committees to "continue, with renewed vigor and determination, to exert their influence in order that disproportionate, privacy-intrusive measures such as bulk surveillance and bulk hacking as contemplated in the Investigatory Powers Bill be outlawed rather than legitimized."
For more on national security and privacy, watch:
The rapporteur also praised the governments of the U.S. and the Netherlands for rejecting the use of backdoors, which would allow deliberate ways through encrypted communications techniques for the benefit of investigators and intelligence agencies.
He also backed up the intervention of the United Nation's high commissioner for human rights, Zeid Ra'ad Al Hussein, in the case of the FBI versus Apple. Zeid said the authorities risk opening a "Pandora's Box" if they succeed in forcing Apple to make a special version of the iPhone software to help investigators access a locked phone that was used by San Bernardino killer Syed Farook.
"It is encouraging to note the latest comments made by US defense secretary Ash Carter when he declared 'that strong encryption is essential to the nation's security'," Cannataci wrote.