A man types on a computer keyboard in front of the displayed cyber code in this illustration picture taken on March 1, 2017. REUTERS/Kacper Pempel/Illustration

AMSTERDAM (Reuters) - The Dutch Senate passed a law early on Wednesday giving intelligence agencies broad new surveillance and other powers, including the ability to gather data from large groups of people at once.

The Senate’s approval was the last hurdle for the “tapping law,” which was moulded into its current form after years of debate and criticism from both the country’s constitutional courts and online privacy advocates.

The law, which was passed with broad support, will go into effect this month after it is signed by the country’s monarch and circulated in the official legislative newspaper.

Online rights group Bits of Freedom warned the Netherlands’ military and civil intelligence agencies will now have the opportunity to tap large quantities of internet data traffic, without needing to give clear reasons and with limited oversight.

They also object to a three-year term for storage of data that agencies deem relevant, and the possibility for them to exchange information they cull with foreign counterparts.

The government argued that the powers are needed to counter threats to national security in the modern era, and their use can be tested by an oversight panel.