The House of Representatives voted overwhelmingly to pass the U.S.A. Freedom Act for the second time in as many years Wednesday, advancing National Security Agency reform to the upper chamber where its fate remains uncertain.

Lawmakers cast the deciding 338-88 vote Wednesday afternoon, passing the bill by a wider margin than last year’s 303-121 vote and sending a clear message to Senate Republicans, the majority of whom oppose the legislation.

In addition to renewing key provisions of the Patriot Act until 2019, the bill also amends Section 215, which allows the NSA to collect and store the landline telephone records of virtually all Americans, and surveil metadata including phone numbers, dialed numbers, call durations and locations.

As a result of the Freedom Act, the 215 Program — first brought to light by NSA whistleblower Edward Snowden in the summer of 2013 — would face a number of reforms. The storage of such records would be transferred to phone companies themselves, forcing the NSA to secure a warrant from the Foreign Intelligence Surveillance Court to search for specific records.

The court itself would also be subject to reform, including the addition of a privacy and civil liberties advocate to weigh in on warrant requests, and making public certain secret legal opinions justifying surveillance.

“Most importantly, the bill, in the reauthorization of the Patriot Act, will in fact end bulk collection,” California Republican Rep. Darrel Issa told the House Rules Committee Tuesday. “This is a delicate balance of the existing needs under the Patriot Act with some significant improvements.”

A number of representatives proposed additional reforms to tack onto the bill, including an amendment from Kentucky Republican Thomas Massie that would have prevented the NSA from installing “back doors” into Americans’ devices through which the agency conducts surveillance. The same measure passed in an overwhelming 293-123 vote last year as part of the 2015 Defense Appropriations Act, but was ultimately removed by the Senate.

Another from Kansas Republican Kevin Yoder sought to amend the 1986 Electronic Communications Privacy Act, which was updated by the Patriot Act to allow the government to collect emails and other records stored electronically without a warrant, so long as they are 180 days old. Yoder initially proposed the change in a bill that well over half the House co-sponsored, despite never being brought to the floor.

Fearing stricter reforms would mean sacrificing broader support for the bill, both the House Judiciary Committee and the House Rules Committee blocked all amendments to the bill prior to Wednesday’s vote.

Erring on the side of caution appears to have at least partly paid off — on Tuesday, the White House came out in support of the Freedom Act, and said the bill “strikes an appropriate balance between significant reform and preservation of important national security tools.”

“The U.S.A. Freedom Act’s significant reforms would provide the public greater trust and confidence in our national security programs and the checks and balances that form an integral part of their operation,” the administration said in a statement.

President Obama’s endorsement could also put greater pressure on the Senate to take up the bill, which Republican Majority Leader Mitch McConnell has tabled in favor of a clean extension to the Patriot Act — an essential tool for intelligence agencies to “connect the dots of information” and prevent a “determined enemy from launching attacks,” according to McConnell.

Passage of the bill was also bolstered by the Second Circuit Court of Appeals, ruling the mass phone surveillance program illegal under Section 215 last week.

“Last week’s historic court decision makes clear that this bill must be strengthened to protect privacy rights,” Michael Macleod-Ball, acting director of the American Civil Liberties Union in Washington, D.C., said in a statement. “Following the court’s ruling, the House should have amended the bill to prevent the government from amassing and keeping the information of innocent Americans. The Senate should not make the same mistake and instead remedy the bill’s many deficiencies, which have been criticized on both sides of the aisle.”

The ACLU brought the case against the NSA in the aftermath of the leaks by Snowden. After last week’s ruling against the government, ACLU v. Clapper will likely head to the Supreme Court.

“Letting Section 215 expire would be preferable to passing the current version of this bill, which fails to adequately protect Americans’ information from unwarranted government intrusion,” Macleod-Ball said.

The ACLU isn’t the only organization to waver in its support of the bill in favor of stronger reforms. The Electronic Frontier Foundation, which recently fought its own legal battle against the government over NSA surveillance, dropped its endorsement of the Freedom Act on Monday.

“We’re urging Congress to roll the draft back to the stronger and meaningful reforms included in the 2013 version of U.S.A. Freedom and affirmatively embrace the Second Circuit’s opinion on the limits of Section 215,” the EFF wrote in a blog post.

“Members like Senators Leahy and Mike Lee and Representatives Jim Sensenbrenner, Robert Goodlatte, and John Conyers should be applauded for working incredibly hard to get the USA Freedom Act through Congress,” the EFF said. “Yet as a result of the Second Circuit decision, the U.S.A. Freedom Act’s modest changes appear even smaller compared to the now judicially recognized problems with the mass collection of Americans’ records.”

Kentucky Republican Sen. Rand Paul and Oregon Democrat Ron Wyden have both stated they plan to filibuster any clean extension of the Patriot Act in the upper chamber, leaving McConnell with limited options for preserving some semblance of Patriot Act surveillance power before provisions including Section 215 sunset on June 1.

Follow Giuseppe on Twitter