Consumers' privacy protections were dealt a blow Thursday when the U.S. Senate voted to remove internet privacy regulations that prevent Internet companies from selling their customers web browsing histories.

In a 50-48 vote Thursday, the Senate voted to repeal a Federal Communications Commission rule that forced broadband internet service provider (ISPs) to get customers opt-in permission to share their information, including what web sites they browsed, geolocation and financial information to outside parties. The regulation was just put on the books five months ago under former president Obama. Republicans voted to repeal the rule while Democrats voted to keep it on the books, according to media reports.

The bill now heads to the House of Representatives for a vote. Sen Bill Nelson, a Florida Democrat, told PC World the ruling means broadband providers would be able to gather and then turn around and sell a “gold mine of data” about customers. The resolution, he argued would “take consumers out of this driver’s seat and place the collection and use of their information behind a veil of secrecy." (See also: New FCC Rules to Protect Privacy.)

Whose Data Is It Anyway?

Opponents of the FCC rule argue the opt-in is costly for the ISPs and subject the companies to privacy regulations that Alphabet Inc.’s Google (GOOG) and Facebook Inc. (FB) don’t have to adhere to. What’s more, they argue it creates an unfair playing field.

When the rule was put on the books a few months ago, it was seen as a blow for broadband companies, since collecting and analyzing information about customers is a lucrative enterprise. The broadband providers can sell the data to marketers, who use it to more effectively to reach their target audience. But it also raises concerns about whether customers, rather than companies, should have the ultimate say over what happens with that data. The FCC’s rule enabled the ISPs to share browsing data with their marketing departments unless the individual opts out. But in order to share data with third-party affiliates, the companies would have to first get the customer's’ consent. The move was a shot in the arm for privacy advocates. However, the 3-2 vote—both Republican-appointed commissioners dissented—has drawn steep criticism from the broadband carriers. (See also: Consumer Protection Laws You Need to Know.)

Earlier this month, Republican Sen. Jeff Flake of Arizona  introduced the bill that seeks to curtail the FCC's authority to regulate online privacy. Flake's bill, which was co-signed by 25 senators and introduced in Congress yesterday, seeks to revert responsibility for regulation of online privacy back to the Federal Trade Commission, an agency tasked with overseeing anti-competitive practices. This would result in an annulment of rules introduced by former FCC Chairman Tom Wheeler last year to put checks on the sharing of consumer data by ISPs with third-party agencies.