WASHINGTON — Senate Democrats narrowly won a vote on Wednesday to save so-called net neutrality rules that ensure unobstructed access to the internet.

The Senate passed a resolution in a 52-47 vote to overturn a decision last December by the Federal Communications Commission to dismantle Obama-era rules that prevented broadband providers like Verizon and Comcast from blocking or speeding up streams and downloads of web content in exchange for extra fees. The commission's repeal of net neutrality is set to take effect in a few weeks.

The rare victory for Democrats is sure to be short-lived, with a similar resolution expected to die in the House, where Republicans have a larger majority. Only three Republican senators voted in support of the resolution.

But that's beyond the point. The effort to stop the repeal of net neutrality rules is part of a broader political strategy by Democrats to rally young voters in the November elections.

"Contact your Republican senator," Senator Chuck Schumer, the Senate minority leader, said in a speech before the vote. "See who votes for net neutrality and who votes against. And let them know how you feel about the way they voted."

For Democrats, net neutrality is part of a three-legged stool — internet access, gun control and marijuana legalization — they are leaning on to entice young voters to engage in the midterm elections. Such voters broadly side with Democrats, even though they are notoriously complacent in nonpresidential election years.

"So the Democratic position is very simple: Let's treat the internet like the public good that it is," Mr. Schumer said.

It is unclear if net neutrality still holds the same interest that set off nationwide protests last December when the F.C.C., led by chairman Ajit Pai, a President Trump appointee, dismantled the rules. Tech companies and consumers decried the commission's action as a major reshaping of the internet, because it would allow broadband providers to create fast lanes for websites that pay to make sure their content, like streaming video, gets priority delivery. Few changes to internet service are expected to come right away.

But it is not stopping Democrats from trying to use it to their advantage. They have been making a similar push on gun control, an issue that grabbed the attention of young people after a gunman slaughtered 17 students and staff members at Florida's Marjory Stoneman Douglas High School in February. And Mr. Schumer has plans to introduce a bill next month that would legalize marijuana.

Republicans were unable to prevent the vote, despite being in the majority, because the measure was tied to an action by a federal agency. The measure, brought as part of the Congressional Review Act, needed only to be brought up within a short period once the agency's rules were codified, and needed only a majority of votes to pass.

Senator John Thune, Republican of South Dakota and the chairman of the commerce committee, called the vote on net neutrality "political theater."

"We are having a fake argument," Mr. Thune said about the vote. He said the Senate "is going nowhere, my colleagues on the other side know that."

Mr. Thune and other Republican lawmakers have proposed their own net neutrality legislation. The law would restore parts of the Obama-era rules, but it would not categorize broadband providers as common-carrier providers that need to follow utility-style rules, which many Democrats consider essential.

"The heavy hand of government is plain to see in the plan Democrats passed in 2015 and is now seeking to reimpose," Mr. Thune said.

Cable, wireless and telecom companies also support the creation of a law for net neutrality that is not as strict as the 2015 regulations, which were created by Tom Wheeler, the former chairman of the F.C.C.

The heads of major trade groups warned Senate leaders of great harm from the net neutrality rules.

The regulations "would curb the necessary investment and infrastructure improvements that are critical for connecting more Americans to high-speed broadband and enabling wider internet access, especially in poor and rural areas," they wrote in a letter to Senator Mitch McConnell, Republican of Kentucky and the majority leader, and Mr. Schumer this week.

The broadband providers have warned that the net neutrality rules and the designation of broadband as a utility-like service could make high-speed internet service subject to rate regulations at the F.C.C. The companies have the backing of the vast majority of Republicans.

The three Republican senators who voted on Wednesday in favor of restoring rules — Susan Collins of Maine, Lisa Murkowski of Alaska and John Kennedy of Louisiana — have complained about the lack of broadband internet competition in their states. Mr. Kennedy said one-fifth of Americans have access to only one provider of broadband internet with sufficient speeds for most modern needs like streaming video.

"The vote comes down to one thing and one thing only: the extent to which you trust your cable company," he said.

Many Silicon Valley start-ups and consumer groups are in support of the stricter rules and have been backing Democrats on the issue. Dozens of tech start-ups, including Pinterest, Medium, Redfin and Etsy, wrote to Senate leaders in support of the vote to restore the broadband rules.

"The repeal of open internet protections threatens the very foundation of the internet," the companies wrote in their letter. "The F.C.C. has abandoned its long history of net neutrality protections and left consumers and businesses without essential protections for their lives and work online."

The congressional battle over net neutrality is just one of many fights taking place over the rules. States have been active in bringing back rules, even with the F.C.C.'s instructions last December that states cannot directly create new rules.

Instead, governors and state legislators in California, Montana, New York and Washington have ordered that any public contracts with broadband providers would require the telecom companies to follow net neutrality rules.

A lawsuit to overturn the F.C.C.'s vote on net neutrality is expected to go to trial in a federal court this summer.

—Reporting was contributed by Thomas Kaplan.

(Disclosure: Comcast is parent of NBCUniversal and CNBC.)