WASHINGTON — House leaders have reached a bipartisan compromise on a bill that would end the National Security Agency’s controversial collection of American phone records, but the measure faces an uncertain future in the Senate.

The House Judiciary Committee on Thursday overwhelmingly passed the latest version of a bill known as the USA Freedom Act by a bipartisan vote of 25 to 2.

The measure seeks to codify President Obama’s proposal to end the NSA’s collection of domestic calling records.

It would allow the agency to request certain records held by the telephone companies under a court order in terrorism investigations.

The authority to collect those records and other related surveillance provisions of the Patriot Act will expire June 1 unless Congress passes a law reauthorizing it.

The House bill would do that, with changes. Senate leaders have introduced a bill that would reauthorize the provisions with no changes, allowing the NSA to continue collecting phone records.

A similar bill to the one that cleared the Judiciary Committee passed the full House last year by a bipartisan vote of 303 to 121 but narrowly failed a procedural vote in the Senate. The Judiciary Committee chairman, Rep. Bob Goodlatte, R-Va., said the bill’s provisions had been carefully negotiated with both the intelligence committee and intelligence agencies.

During the hearing, lawmakers said a deal had been reached to bring the USA Freedom Act to the floor without going through the intelligence committee, where many Republicans support continuing the NSA bulk collection.

The NSA’s collection and storage of U.S. “to and from” landline calling records – times, dates and numbers, but not content of the calls – was the most controversial program among many disclosed by former NSA systems administrator Edward Snowden.

Only subscribers are eligible to post comments. Please subscribe or to participate in the conversation. Here’s why.

Use the form below to reset your password. When you've submitted your account email, we will send an email with a reset code.