Under the bipartisan bills in the House and Senate, the Patriot Act would be changed to prohibit bulk collection, and sweeps that had operated under the guise of so-called National Security Letters issued by the F.B.I. would end. The data would instead be stored by the phone companies themselves, and could be accessed by intelligence agencies only after approval of the secret Foreign Intelligence Surveillance Act court.

The legislation would also create a panel of experts to advise the FISA court on privacy, civil liberties, and technology matters, while requiring the declassification of all significant FISA court opinions.

The debate has resulted in a highly unusual alliance of House Speaker John A. Boehner, the White House, the Tea Party and a bipartisan majority in the House. They are in opposition to Mr. McConnell, his Intelligence Committee chairman, and a small group of defense hawks. In addition, two Republican presidential candidates in the Senate, Ted Cruz of Texas and Rand Paul of Kentucky, have made it clear they will not accept a straight extension of the current Patriot Act.

Unlike last year, when a similar bill passed the House overwhelmingly but failed in the Senate, this year’s USA Freedom Act was drafted in delicate negotiations among the House Judiciary Committee, House Intelligence Committee, House Republican leaders and supporters in the Senate. The Senate, now in Republican control, includes four freshmen who supported the bill in the House last year.

The act, which expires June 1, is up for its first reauthorization since the revelations about bulk data collection. That impending deadline, coupled with an increase of support among members of both parties, pressure from technology companies and a push from the White House have combined to make changes to the provisions more likely.