Maybe net neutrality isn’t dead after all.

The Senate on Wednesday voted 52 to 47 to overturn the Federal Communications Commission’s repeal of the rules, with three Republicans joining the mostly Democratic effort. The issue now heads to the House, where it is likely to have a tougher time because Republicans hold a larger majority than in the Senate.

Obtaining three Republican votes in favor of overturning the repeal came as a surprise after initially just one had expressed a willingness to side with Democrats on the matter. The move is a rebuke to President Donald Trump and his Republican FCC Chairman Ajit Pai, who had pushed through the repeal of net-neutrality rules despite widespread public support for the Obama-era standards.

In December, the FCC voted to repeal the net-neutrality rules, which prohibit internet service providers from slowing or blocking internet traffic and preferring certain content over others. That 3-2 partisan vote was contentious, with the two Democratic FCC commissioners protesting along with the public against the repeal.

The FCC recently scheduled the net-neutrality repeal to take effect June 10.

Get tech news in your inbox weekday mornings. Sign up for the free Good Morning Silicon Valley newsletter.

Democrats in the Senate, however, brought the matter to a vote so lawmakers would have to publicly register on which side of the contentious issue they stand. Sen. Ed Markey, D-Massachusetts, used the Congressional Review Act, a procedure through which Congress can review and overturn rules by federal agencies, to force the vote in the Senate.

“Thank you @SenatorCollins, @SenJohnKennedy and Senator @LisaMurkowski for standing on the right side of history and voting to save #NetNeutrality,” Markey tweeted Wednesday.

“To all of those who kept fighting and didn’t get discouraged: you did this,” Markey continued. “You raised your voices and we heard you. Thank you.”

The victory likely will be short-lived — the bill now moves to the House of Representatives, where it will encounter greater difficulty given the large Republican majority there. And if it were passed, it would face an almost certain veto from President Trump.

Nevertheless, Democrats believe the Senate vote will give them a potent issue in the November elections, given the popularity of net neutrality.

The FCC received millions of comments — a record — about its plan to repeal the rules before it voted to do so in December, and net-neutrality advocates say the commission ignored the will of the majority of Americans.

Tech industry groups praised the vote.

“We all owe a debt of gratitude to Senators today for recognizing what a serious misstep the FCC has taken — and doing all they can to stop it,” said Ed Black, president and CEO of the Computer & Communications Industry Association, in a statement Wednesday. “We urge the House to follow the Senate’s action.”

The broadband industry and the FCC chair expressed their disappointment.

“This vote throws into reverse our shared goal of maintaining an open, thriving internet,” said Jonathan Spalter, president and CEO of USTelecom. “Consumers want permanent, comprehensive online protections, not half measures or election year posturing from our representatives in Congress.”

Pai sent a statement through a spokeswoman: “It’s disappointing that Senate Democrats forced this resolution through by a narrow margin. But ultimately, I’m confident that their effort to reinstate heavy-handed government regulation of the Internet will fail.”

The House is controlled by Republicans 235 to 193, but with three Republicans crossing the political aisle in the Senate over net neutrality, Democrats and other net-neutrality advocates are urging people to keep up the pressure on their lawmakers.

During a press conference after Wednesday’s vote, Markey said that because the issue is so popular among many Americans — a recent poll shows more than 80 percent of Americans support net neutrality, including 75 percent of Republicans — it could become key in the midterm elections in November.

“Don’t listen to the naysayers — momentum is on the side of those who favor restoring net neutrality now,” said Gigi Sohn, former counselor to former FCC Chairman Tom Wheeler, under whom the Open Internet Rules were passed. “We’ve seen the impossible become possible in past technology policy battles like the fight against the Stop Online Piracy Act,” Sohn added.

Rep. Anna Eshoo, D-Palo Alto, called the vote a “delicious victory.”

“Fundamentally, this is about ensuring we are the individuals that decide what we want to hear, what we want to watch, what we want to play, what we want to read,” said Eshoo, who has advocated for net neutrality for so long that she’s known as the “godmother of net neutrality” in the House, during Wednesday’s press conference.