(Bloomberg) -- Senate Democrats won a vote to preserve net neutrality regulations, a victory for a measure that still faces obstacles to becoming law but could appeal to young voters and boost the party in mid-term elections.

The Senate voted 52 to 47 with three Republicans joining all the Democrats and independents, in favor of a resolution to eliminate the Republican-led Federal Communications Commission’s December gutting of earlier rules passed by Democrats.

The win could be short-lived. The Senate measure needs to win a vote in the House where Republicans have a larger majority, and to get a signature from President Donald Trump, who supports the FCC’s action.

The agency last year eliminated Obama-era rules forbidding internet service providers from blocking or slow web traffic. In their place are requirements that companies disclose how they handle data flows. Enforcement is left to another agency. The change is to take effect June 11.

Open-internet advocates are challenging the new rule in federal court.

Senator Ed Markey, the Massachusetts Democrat who introduced Wednesday’s resolution, said during debate on the Senate floor that the measure would guarantee “no slowing down certain websites, no blocking websites, and no charging you more to exercise your 21st century right to access the internet.”

Republicans voting for the measure included Susan Collins, of Maine, John Kennedy, of Louisiana, and Lisa Murkowski, of Alaska.

Senator John Thune, a South Dakota Republican, called Markey’s resolution “cynical” and a “bizarre exercise which we all know isn’t going anywhere.” The House won’t pass it and Trump would veto it, Thune said.

Net neutrality is an issue that resonates among certain Democratic voters, particularly millennials who might be persuaded to turn out in greater numbers in November’s midterm elections that may determine which party controls the House and Senate, where Republicans hold a 51-49 margin.

“For millions of motivated and infrequent voters, this is a top issue,’’ Senator Brian Schatz, a Hawaii Democrat, told reporters. “Other than health care and taxes, this is one of the issues that has motivated most grassroots activity,’’ he said. Even though it’s “very likely’’ consumers won’t see a change in Internet service soon, “people understand that a free and open internet is worth fighting for.’’

Trade associations representing the largest internet service providers including AT&T Inc., Verizon Communications Inc. and Comcast Corp. in a May 15 letter to Senate leaders urged a vote against the resolution, saying its success would reinstate outdated regulations and curb investment.

--With assistance from James Rowley

Bloomberg News