Dr. Lewis added: “The same way you wouldn’t say that we don’t need the F.A.A. because we can rely on incentives and a voluntary approach, we can’t rely on incentives and voluntary action for cybersecurity. Every day the risk gets bigger, it is not only countries but politically motivated individuals who can just download this stuff. A lot of us hoped Congress would have done better than this.”

Senator Joseph I. Lieberman, the independent from Connecticut who sponsored the measure as chairman of the Homeland Security and Governmental Affairs Committee, and the committee’s ranking member, Senator Susan Collins, Republican of Maine, said Friday that they were caught off guard by the determined opposition of Mr. McCain, who has for years made national security issues his priority.

“He knows that I’m disappointed,” Mr. Lieberman said, referring to Mr. McCain, one of his closest allies and friends in the Senate. “His natural side, based on his whole history, is to do the best thing for security and not to be worried about other factors.”

Tension between Mr. Lieberman and Mr. McCain bubbled to the surface on Wednesday at a closed-door meeting of senators and staff members about the legislation in the office of Senator Jon Kyl of Arizona, the No. 2 Senate Republican, said Congressional aides who attended the meeting and discussed the deliberations on the grounds that they would not be quoted by name.

The staff members said Mr. Lieberman openly questioned Mr. McCain about why he was putting the interests of the Chamber of Commerce over national security and asked Mr. McCain what he would say if he blocked the bill and the nation suffered a catastrophic cyberattack.

Mr. McCain, the staff members said, became visibly angry and shouted back at Mr. Lieberman, saying that his reputation on national security issues was unquestionable.

In a telephone interview, Mr. Lieberman acknowledged that he had had a disagreement with Mr. McCain at the meeting but declined to discuss the specifics.