The Democratic-led Senate easily cleared a hurdle to averting a government shutdown after a Republican lawmaker ended a 21-hour speech aimed at using the measure to derail President Barack Obama’s signature health care overhaul.

Senators voted unanimously on Wednesday to allow a temporary spending bill to be officially lain before the Senate, one of several steps needed to move forward with the measure. Another key vote is expected by Saturday, with an October 1 deadline looming to keep the government fully operating.

But a showdown looms over a provision in the bill to defund the 3-year-old health care law, which aims to extend insurance coverage to millions. The Senate is all but certain to strip the legislation of that language, which Republican-controlled House of Representatives included in an attempt to dismantle Mr. Obama’s most important domestic accomplishment.

The question is whether the House will approve the bill if the Senate sends it back as a straight-forward funding measure without the health care provision or reject it and risk a government shutdown.

To avoid a partial government shutdown, a single, agreed-upon version must be approved by Congress and signed by Mr. Obama by Tuesday. Officials pointed out that there is still time for the Senate to restore the funds for the health care law and for the House to seek a more modest overhaul concession, perhaps a one-year delay in the requirement for individuals to purchase coverage or the repeal of a tax on medical devices that many Democrats oppose.

The issue has roiled the Republican Party, exacerbating the divide between hard-right conservatives and more moderate party leaders who fear Republicans will get blamed if the government shuts down.

Encouraged by conservative groups, Texas Sen. Ted Cruz, a potential 2016 presidential candidate, spoke all night and through morning in favour of using the spending bill to kill the health care law. He stopped talking after 21 hours, 19 minutes, with occasional remarks by other conservative senators.

Then he simply sat down and joined every other senator in the 100-0 procedural vote. He said Republicans should rally against the measure in a vote scheduled Friday or Saturday on whether to cut off a delaying tactic on the spending bill itself.

The Senate’s top Democrat, majority leader Harry Reid, shrugged off Mr. Cruz’s effort. “For lack of a better way of describing this, it has been a big waste of time,” he said.

Such paralyzing fiscal fights have dominated Washington in recent years, underscoring the deep divide between the Republicans and the Obama administration and its Democratic allies. The two sides have managed in the past to come up with last-minute compromises to avoid a government closure.

Even if a shutdown is averted, a potentially even bigger impasse looms in October over the U.S. debt limit.

If no agreement is reached, the U.S. risks a first-ever default on its obligations. Treasury Secretary Jacob Lew said the government will have exhausted its borrowing authority by Oct. 17, leaving the United States just $30 billion cash on hands to pay its bills.

Republicans fiercely oppose the health care overhaul as an intrusion into individual decision-making. But Republican leaders opposed Mr. Cruz’s time-consuming effort, arguing that defunding the health care law simply won’t happen with a Democratic president and Democrats controlling the Senate.

Mr. Cruz, who had started speaking Tuesday afternoon, filled the time in a largely empty chamber, criticizing the law and comparing the fight to the battle against the Nazis. He talked about the Revolutionary War, the Washington ruling class, his Cuban-born father who worked as a cook and even recited Dr. Seuss’ “Green Eggs and Ham.”

Republican leaders fear that such delaying tactics would push a final vote into the weekend, giving House Republicans little time to come up with a new temporary spending bill needed to avert a partial shutdown.

Democrats calculate that the public will blame Republicans for any interruption in government services or benefits, as it did during the last Republican-driven shutdown in 1995-96, which ended up reviving the political fortunes of President Bill Clinton.

“I just don’t believe anybody benefits from shutting the government down, and certainly Republicans don’t,” said Sen. Orrin Hatch, a Utah Republican. “We learned that in 1995.”