The US House of Representatives has shrugged off a veto threat from president Barack Obama to pass the controversial Cyber Intelligence Sharing and Protection Act (CISPA).
The Republican-controlled House passed the bill by a margin of 248 votes to 168 and it will now go before the US Senate.
The bill is intended to allow federal officials to collect a variety of internet data, ostensibly to ward off potential terrorist attacks.
But the legislation has proved hugely divisive, with many critics arguing it will let the authorities spy on citizens' communications and pass sensitive user data to the government without any safeguards, such as the need to get a warrant.
Online rights group the Electronic Frontier Foundation (EFF) has vowed to step up its campaign against CISPA when the legislation goes in front of the Senate.
"We must do everything within our power to safeguard the privacy rights of individual Internet users and ensure that Congress does not sacrifice those rights in a rush to pass vaguely-worded cybersecurity bills," said Lee Tien, EFF senior staff attorney in a blog.
The American Civil Liberties Union also warned that the bill should not be allowed to pass the Senate.
“CISPA goes too far for little reason. Cybersecurity does not have to mean abdication of Americans’ online privacy. We encourage the Senate to let this horrible bill fade into obscurity,” said ACLU legislative counsel Michelle Richardson in a statement.
Earlier this week, president Obama had vowed to veto CISPA should it be passed, arguing that it would undermine the US public's faith in government.