By Toby Sterling

AMSTERDAM (Reuters) - Dutch voters on Wednesday approved a referendum granting spy agencies the power to install bulk taps on Internet traffic, even as news of Facebook's 50 million user profile leak returned digital privacy issues to the fore.

An exit poll by national broadcaster NOS showed 49 percent voted "yes" versus 48 percent "no". The referendum is nonbinding, and Prime Minister Mark Rutte will now allow the law, which has already been approved by both houses of parliament, to go into effect.

"It's not that our country is unsafe, it's that this law will make it safer," he said.

Dubbed the "trawling law" by opponents, the legislation will let spy agencies install taps targeting an entire geographic region or avenue of communication, store information for up to three years, and share it with allied spy agencies.

Digital rights group Bits of Freedom, which had advised a "No" vote, said the law is not all bad, given that taps must be approved beforehand by an independent panel.

But the group said it still fears privacy violations and urged that the law be reconsidered.

(Reporting by Toby Sterling; editing by Catherine Evans and David Gregorio)