WASHINGTON (AP) -- Filibuster or no, Sen. Ted Cruz's marathon speech on the Senate floor made one point: Obamacare had to go. But when the freshman senator finally stopped talking Wednesday after 21 hours and 19 minutes, he was no closer to killing President Barack Obama's signature health care law.

The Senate promptly advanced legislation required to avert a partial government shutdown at midnight Monday, and is expected to strip from that crucial bill the provision to defund Obama's law.

Weary after a day and night on his feet, Cruz simply sat down at 12 noon EDT on Wednesday, the predetermined time for the Senate to adjourn, as several of his colleagues applauded. Senate Republicans and some House members congratulated the Texas freshman.

Sen. Ted Cruz, R-Texas, talks to reporters as he emerges from the Senate Chamber Wednesday. AP Photo/J. Scott Applewhite

Cruz actually joined every other senator in a 100-0 procedural vote to allow the measure to officially go before the Senate. He says Republicans should rally against the measure in a vote scheduled Friday or Saturday on whether to cut off a filibuster on the measure itself, a vote that promises to give Democrats controlling the chamber a procedural edge if Cruz is not successful in blocking them.

Cruz wants to derail the spending bill to deny Democrats the ability to strip a "defund Obamacare" provision out, a strategy that has put him at odds with other Republicans who fear that the move would spark a shutdown. After the vote, Cruz told reporters he hopes "that Republicans will listen to the people, and that all 46 Republicans come together. Coming into this debate we clearly were not united, there were significant divisions in the conference. I hope those divisions dissolve, that we come together in party unity."

The Senate's top Democrat, Majority Leader Harry Reid, shrugged off Cruz's effort.

"For lack of a better way of describing this, it has been a big waste of time," said Reid, D-Nev.

Since Tuesday afternoon, Cruz -- with occasional remarks by Sen. Mike Lee, R-Utah, and other GOP conservatives -- has controlled the Senate floor and railed against Obamacare. When he finally sat down, Cruz and his allies had talked for more than 21 hours, the fourth-longest Senate speech since precise record-keeping began in 1900.

That exceeded March's 12-hour, 52-minute speech by Sen. Rand Paul, R-Ky., like Cruz a tea party lawmaker and potential 2016 presidential contender, and filibusters by such Senate icons as Huey Long of Louisiana and Robert Byrd of West Virginia.

The filibuster is a time-honored delaying tactic to prevent the Senate from passing legislation. However, Reid and others disputed that Cruz's speech was a real filibuster because the procedural vote forced an automatic end to the debate.

With no food or restroom breaks, his tie finally loosened, Cruz was helped by eight of his conservative allies who gave him brief respites by asking lengthy questions as permitted under Senate rules, though he was required to remain on his feet.

In a reflection of the limited GOP support for Cruz's effort, no members of the Senate leadership came to the Texan's aid.

Cruz said he has learned that defying party leaders is "survivable," adding, "Ultimately, it is liberating" and that his long evening involved "sometimes some pain, sometimes fatigue."

But he added, "You know what? There's far more pain in rolling over. ... Far more pain in not standing up for principle."

Republican leaders and several rank-and-file GOP lawmakers had opposed Cruz's time-consuming effort with the end of the fiscal year looming. Both Democrats and Republicans say they want to speed Senate action so that the GOP-controlled House would have enough time to respond to the Senate's eventual action.

Two financial deadlines loom -- keeping the government operating after Oct. 1 and raising the nation's borrowing authority. In a letter to Congress on Wednesday, Treasury Secretary Jacob Lew said the government will have exhausted its borrowing authority by Oct. 17, leaving the United States with just $30 billion cash on hand to pay its bills.

That's a slightly worse financial position than Treasury predicted last month and it adds to the pressure on Congress to increase the government's borrowing cap to avert a first-ever U.S. default on its obligations.

The House-passed measure is required to prevent a government shutdown after midnight Monday and contains a tea party-backed provision to "defund" implementation of what's come to be known as "Obamacare". Cruz is opposed to moving ahead on it under debate terms choreographed by Democrats to defeat the Obamacare provision.

Cruz has angered many GOP colleagues who complain privately that the freshman has set impossible expectations at the expense of other Republicans. Some of Cruz's leading allies include organizations like the Senate Conservatives Fund and the Club for Growth, organizations which frequently donate money to conservatives challenging more moderate Republicans in primaries.

In a direct rebuttal to Cruz, Republican Sen. John McCain offered a history lesson on how Republicans had tried to stop the health care law in 2009 and rejected Cruz's statement equating those unwilling to vote to stop Obamacare with Nazi appeasers.

"I resoundingly reject that allegation," McCain said. "It does a great disservice to those Americans who stood up and said what's happening in Europe cannot stand."

Under pressure from Cruz and tea party activists, House GOP leaders added the anti-Obamacare language to the funding measure despite fears it could spark a partial government shutdown that could hurt Republicans in the run-up to midterm elections next year -- just as GOP-driven government shutdowns in 1995-96 help revive 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, R-Utah. "We learned that in 1995."