The House on Thursday approved by a wide margin a bill that would end the National Security Agency’s mass collection of Americans’ phone call records, a counterterrorism program that stoked privacy concerns after its existence was leaked last year.

The USA Freedom Act, which began as a broad package of surveillance reforms embraced by civil libertarians and tea party Republicans, was revised this week to meet the concerns of intelligence and law enforcement officials.

The amended bill lost the support of dozens of co-sponsors who were upset that the reforms were scaled back. But it picked up the votes of Intelligence Committee members and others who opposed the original measure and passed 303 to 121.

“Let me be clear, I wish this bill did more,” said Rep. F. James Sensenbrenner Jr. (R-Wis.), the measure’s primary sponsor. “To my colleagues who lament changes, I agree with you. . . . But this bill still deserves support.”

Reform advocates are now turning their focus to the Senate, where the Judiciary Committee will take up the legislation in June.

The House vote appears to reflect a sense by the administration and many members of Congress that, almost one year after the program was disclosed following a leak by former NSA contractor Edward Snowden, it is time to resolve the controversy and move on.

In January, President Obama called for an end to the NSA’s bulk gathering of phone records. The program does not collect call content. A breakthrough occurred earlier this month when the leaders of the House judiciary and intelligence committees reached a deal on legislation, a compromise that satisfied privacy advocates.

But in recent days, following intense lobbying by senior intelligence officials, the committee leaders agreed to changes. On Wednesday, the White House endorsed the bill, saying it “ensures our intelligence and law enforcement professionals have the authorities they need to protect the nation, while further ensuring that individuals’ privacy is appropriately protected.”

The revised measure would end the government’s ability to collect from phone companies billions of call detail records of Americans with a single court order. But, privacy advocates say, it could still enable the collection of large amounts of data that, for instance, originate from a single Zip code.

“If we leave any ambiguity at all, we have learned that the intelligence community will drive a truck through that ambiguity,” said Rep. Zoe Lofgren (D-Calif.).

Judiciary Committee Chairman Bob Goodlatte (R-Va.) said, “This is a carefully crafted, bipartisan bill” that “once again proves that American liberty and security are not mutually exclusive.”

The legislation is “better than the intelligence committee’s competing bill or no bill at all,” said Kevin Bankston, policy director of the New America Foundation’s Open Technology Institute. “But we’re going to have our work cut out for us in the Senate to reverse the changes that have weakened” the bill.

Senate Judiciary Committee Chairman Patrick J. Leahy (D-Vt.) said that he was disappointed that the legislation lost some of the “meaningful reforms contained in the original” bill and that he will push to restore them.

Brian Fung contributed to this report.