The House of Representatives passed a bill Thursday to limit the National Security Agency's bulk collection of phone records.

The NSA's surveillance methods, which were exposed last year by former NSA contractor Edward Snowden, incited public and congressional anger that the NSA was not honest about their data collection methods.

The bill, called the USA FREEDOM Act, which was sponsored by Rep. James Sensenbrenner, R-WI, passed 303-121, with 179 Republicans and 124 Democrats in favor of the bill. Fifty-one Republicans and 70 Democrats opposed the bill, according to USA Today.

The new bill orders phone companies to hold records for 18 months, but forces the NSA to get a judicial order to access phone records that are suspected to be tied to terrorist plots. The bill will now go to the Senate, where it will be sponsored by Judiciary Chairman Patrick Leahy, a Vermont Democrat.

Civil liberties groups criticized the new legislation, saying it is lacking original provisions.

The bill dropped a provision that would have created a position for an independent public advocate on the secret court that oversees the NSA's dealings. The bill also leaves out another provision that would have required the NSA to release reports to the federal government annually about people who are under domestic surveillance.

"We cannot expect this bill to protect privacy and civil liberties while the public and Congress continue to be in the dark about the policies in practice. Without transparency, there will be no way of knowing if the bulk collection of data has ended," said Danielle Brian of the Project on Government Oversight.

Sen. Leahy said he will work to reinstate the provisions when his committee reviews the bill this summer.

The co-sponsor of the original bill, Rep. Tulsi Gabbard of Hawaii, voted against the legislation Thursday.

"This is not a choice between civil liberties and national security. We still have yet to hear of a single example of how national security has been strengthened by allowing bulk data collection," she said.

Gabbard said the legislation still allows the NSA to have access to Americans' personal data.

Bob Goodlatte, R-VA, the House Judiciary Chairman, said the bill strikes a good balance between protecting civil liberties and taking measures to prevent terrorism.

The new bill prohibits bulk e-mail collection, as well as the collection of financial records and firearms purchases.

Yet, a group of major tech companies, including Facebook and Google, withdrew their support for the bill Wednesday, claiming that it still allows for a loophole to collect domestic personal data.