The vote was 248 to 168, as 42 Democrats joined 206 Republicans in backing the bill. The â€œnoâ€ votes were cast by 140 Democrats and 28 Republicans, including a number who described the measure as a potential threat to privacy and civil liberties.
Under the bill, the federal government can share classified information with private companies to help them protect their computer networks. Companies, in turn, could voluntarily share information about cyberthreats with the government and would generally be protected against lawsuits for doing so if they acted in good faith.
The White House opposed the bill, saying it could â€œundermine the publicâ€™s trust in the government as well as in the Internet by undermining fundamental privacy, confidentiality, civil liberties and consumer protections.â€
In addition, the White House said the government should set â€œminimum cybersecurity performance standardsâ€ for the private sector â€” an approach resisted by House Republican leaders.
â€œThe White House believes the government ought to control the Internet, government ought to set standards and government ought to take care of everything thatâ€™s needed for cybersecurity,â€ said Speaker John A. Boehner. â€œTheyâ€™re in a camp all by themselves.â€
â€œWe canâ€™t have the government in charge of our Internet,â€ Mr. Boehner added.
The Senate is working on a more comprehensive bipartisan bill that directs the secretary of the Department of Homeland Security to issue regulations to protect â€œcritical infrastructure,â€ including the electric power grid, water and sewer systems, transportation hubs and financial service networks.
In confidential briefings on Capitol Hill, administration officials have expressed alarm about the damage that could be done by malicious attacks on computer systems and networks that have become an indispensable part of everyday life. Supporters of the bill said China was stealing jobs by pilfering proprietary information and valuable trade secrets stored in American computers.
The House bill was written by Representatives Mike Rogers, Republican of Michigan and chairman of the House intelligence committee, and C. A. Dutch Ruppersberger of Maryland, the senior Democrat on the panel.
They accepted many amendments to protect privacy, but not enough to satisfy advocacy groups like the American Civil Liberties Union or the Center for Democracy and Technology. The civil liberties union criticized the bill as â€œa privacy disaster.â€
However, Mr. Rogers said the sharing of information with the government was â€œall voluntary,â€ and he added, â€œThere is no government surveillance, none, not any in this bill.â€
The bill says that â€œcyber threat informationâ€ shared with the federal government by the private sector can be used for five purposes: to protect computer systems; to investigate cybersecurity crimes; to protect people from â€œserious bodily harmâ€; to protect â€œthe national security of the United Statesâ€; and to prevent the sexual exploitation or kidnapping of children.
Some members of both parties said they worried that the bill could lead to violations of privacy.
â€œWe do have a real cyberthreat in this country, and this bill is an honest attempt to deal with it,â€ said Representative Joe L. Barton, Republican of Texas, who voted against the legislation.
â€œBut the absence of explicit privacy protections for individuals is, to me, a greater threat to democracy and liberty than the cyberthreats that face America.â€
The House Democratic leader, Representative Nancy Pelosi of California, said, â€œThe threat of cyberattack is a real one, but the response must balance freedom and security.â€