A bill to protect the nation's critical infrastructure from cyberattacks has again failed to clear a congressional hurdle.

The U.S. Senate on Wednesday rejected the measure by a 51-47 vote that marked the second time it has gone down to defeat.

The vote forecloses action on the legislation until next year, despite warnings by national security officials that the U.S. needs new ways to protect financial institutions, power plants and other critical infrastructure from assault.

"The bill that was, and is, most important to the intelligence community and to the Pentagon was just killed," Senate Majority Leader Harry Reid said after the vote. "So everyone should understand, cyber security is dead for this Congress. What an unfortunate thing. But that is the way it is."

The legislation, dubbed the Cybersecurity Act or 2012, would make it easier for companies and the government to share information about cyber threats and encourage companies to take steps to reinforce security on their networks.

In a repeat of a Senate vote in August, most Democrats voted in favor of the measure while most Republicans voted against it.

Business groups, led by the U.S. Chamber of Commerce, opposed the legislation.

"Frankly, the underlying bill is not supported by the business community, for all the right reasons, and they are the ones who are impacted by it," said Senator Saxby Chambliss, a Georgia Republican and vice chairman of the Intelligence Committee, who opposed the bill. "They are the ones who are going to be called on to comply with the mandates and the regulations. Frankly, it is not going to give them the kind of protection they need from cyber-attacks."

Senator Dianne Feinstein, who chairs the Senate Intelligence Committee, warned before the vote of a looming digital threat.

"I am very worried there will be a major cyberattack on this nation," Feinstein said. "I do not say that without intelligence to back it up."

The vote follows a string of cyberattacks since September on at least 10 banks and a vow from a group that has claimed responsibility for the assaults to mount others.

The attacks flooded lines that connect banks to the Internet and prevented customers from retrieving their accounts.

In October, Defense Secretary Leon Panetta called the attacks "unprecedented" in their scale and speed.