Senate Republicans on Thursday took their first major step toward repealing the Affordable Care Act, approving a budget blueprint that would allow them to gut the health care law without the threat of a Democratic filibuster.

The vote was 51-48. During the roll call, Democrats staged a highly unusual protest on the Senate floor to express their dismay at the prospect that millions of Americans could lose their health insurance.

One by one, Democrats rose to voice their objections. Sen. Maria Cantwell of Washington said that Republicans were “stealing health care from Americans.” Sen. Ron Wyden of Oregon said he was voting no “because health care should not just be for the healthy and wealthy.”

The presiding officer, Sen. Cory Gardner, R-Colo., repeatedly banged his gavel and said the Democrats were out of order because “debate is not allowed during a vote.”

The final vote, which ended just before 1:30 a.m., followed a marathon session in which senators took back-to-back roll call votes on numerous amendments, an arduous exercise known as a vote-a-rama.

The approval of the budget blueprint, coming even before President-elect Donald Trump is inaugurated, shows the speed with which Republican leaders are moving to fulfill their promise to repeal President Barack Obama’s signature domestic policy achievement — a goal they believe can now be accomplished with Trump’s election.

The action by the Senate was essentially procedural, setting the stage for a special kind of legislation called a reconciliation bill. Such a bill could be used to repeal significant parts of the health law and, critically, would be immune from being filibustered. Congress appeared to be at least weeks away from voting on legislation repealing the law.

Republicans say the 2016 elections gave them a mandate to roll back the health law.

“The Obamacare bridge is collapsing, and we’re sending in a rescue team,” said Sen. Michael B. Enzi, R-Wyo., the chairman of the Senate Budget Committee. “Then we’ll build new bridges to better health care, and finally, when these new bridges are finished, we’ll close the old bridge.”

Republican leaders say they will work closely with Trump developing legislation to repeal and replace the health law, but it is unclear exactly how his team will participate in that effort.

On Wednesday, Trump said he would offer his own plan to repeal and replace the law “essentially simultaneously.” He said he would put forth the plan as soon as his nominee for secretary of health and human services, Rep. Tom Price, R-Ga., is confirmed.

The Affordable Care Act has become ingrained in the health care system, and unwinding it would be a formidable challenge. More than 20 million people have gained coverage under the law, although premiums have risen sharply in many states and some insurers have fled the law’s health exchanges.

The budget blueprint instructs House and Senate committees to come up with repeal legislation by Jan. 27.

Joined by four other Republican senators, Sen. Bob Corker of Tennessee had sought to delay that deadline by five weeks, to March 3. But late Wednesday, Corker withdrew an amendment that would have changed the date.

“We understand that everyone here understands the importance of doing it right,” he said.

He described the Jan. 27 date in the budget blueprint as a placeholder.

Sen. Rob Portman of Ohio, another Republican who sought to delay the deadline, said: “This date is not a date that is set in stone. In fact, it is the earliest we could do it. But it could take longer, and we believe that it might.”

The House was planning to take up the budget blueprint once the Senate approved it, although some House Republicans have expressed discomfort with voting on the blueprint this week because of lingering questions over how and when the health care law would be replaced.

A vote on the measure in the House could come Friday.

In its lengthy series of votes, the Senate rejected amendments proposed by Democrats that were intended to allow imports of prescription drugs from Canada, protect rural hospitals and ensure continued access to coverage for people with pre-existing conditions, among other causes.

In the parlance of Capitol Hill, many of the Democrats’ proposals were “messaging amendments,” intended to put Republicans on record as opposing popular provisions of the Affordable Care Act. The budget blueprint is for the guidance of Congress; it will not presented to the president for a signature or veto and will not become law.

As the Senate plowed through its work Wednesday, Republicans explained why they were determined to dismantle the law, and they tried to assuage concerns about the future of coverage for millions of Americans.

“This is our opportunity to keep our campaign promise,” said Sen. Roger Wicker, R-Miss. “This is our opportunity to help the president-elect and the vice president-elect keep their campaign promises and show to the American people that elections have consequences.”

Sen. Johnny Isakson, R-Ga., said that while working to repeal the health care law, “we must also talk about what we replace it with, because repealing it without a replacement is an unacceptable solution.”

Republicans do not have an agreement even among themselves on the content of legislation to replace the Affordable Care Act, the timetable for votes on such legislation or its effective date.

Sen. Susan Collins, R-Maine, said Wednesday that she agreed with Trump that Congress should repeal the health law and adopt a replacement at about the same time.

“But I don’t see any possibility of our being able to come up with a comprehensive reform bill that would replace Obamacare by the end of this month,” she said. “I just don’t see that as being feasible.” (Collins also supported pushing back the deadline to come up with repeal legislation.)

As Republicans pursue repealing the law, Democrats contend that Republicans are trying to rip insurance away from millions of Americans with no idea of what to do next.

The Senate Democratic leader, Chuck Schumer of New York, called the Republicans’ repeal plan “irresponsible and rushed” and urged them to halt their push to unravel the law.

“Don’t put chaos in place of affordable care,” he said.