The UK just passed the most elaborate mass surveillance law in the Western world. The Investigatory Powers Bill, commonly referred to in England as “The Snoopers Charter,” gives the government unprecedented access to the online activities of its citizens as well as legally requiring tech companies to cooperate with government investigations.

Both the House of Lords and the House of Commons have now passed the bill, leaving only the final step, royal assent or approval from the queen, in order to go into effect. It is expected to receive that formal blessing before the end of the year.

The intent behind the bill is to allow the British government the authority to prevent the internet from being used to commit crimes, though many privacy groups and tech companies argue that it infringes upon the privacy of law-abiding citizens.

The bill will require ISPs (internet service providers) to retain records of all online activities for a year, and permits various government agencies access to these records for law enforcement purposes. It also gives the government the legal right to hack into computers and mobile devices. The method, referred to as “equipment interference,” can include extracting information, monitoring the use of or listening in on any communications transmitted over computers, mobile phones, or other digitally connected devices.

This means the internet browsing history, email, text, and telephone communications, as well as data stored on British citizen’s computers with access to the internet, can all be legally accessed, reviewed, and stored by agencies within the British government. In effect, anything you do on a phone or computer within the U.K. will be subject to government surveillance.

The ability to access citizens’ web-browsing history is one of the chief concerns of civil rights groups within the U.K., particularly in regard to journalists, lawyers, and medical professionals who need to exercise a level of privacy in the execution of their professional duties. Although additional protections have been put into place to protect the privacy of such professions, many claim the additional steps amount to nothing more than an extra box to check before accessing private information.

The bill also gives the British government the authority to “bulk hack” the devices within any region of the globe in the interest of national security, though such actions must be approved by the secretary of state, particularly when hacking into devices in other countries.

Jim Killock, executive director of the Open Rights Group, said before the recent vote, “If passed, it would mean that the U.K. has one of the most draconian surveillance laws of any democracy with mass surveillance powers to monitor every citizen’s browsing history.”