Sen. Ted Cruz's (R-Tex.) marathon speech against, modeled on an old-fashioned filibuster, Obamacare touches on green eggs and ham, Ashton Kutcher, poker, and several other topics. (Sarah Parnass/The Washington Post)

Sen. Ted Cruz (R-Tex.) ended his marathon talking attack on President Obama’s health-care law Wednesday after 21 hours and 19 minutes — a feat of stamina that seems likely to complicate House GOP efforts to pass a funding bill aimed at averting a looming government shutdown.

The freshman senator ceded the floor — and got his first opportunity for a bathroom break — at noon, after running up against a deadline imposed by Senate procedural rules. A little over an hour later the Senate voted to choke off the first filibuster hurdle on its own version of the funding bill, which is the first step toward allowing Democrats to include funding for the health-care law that had previously been stripped out by the House.

Both houses of Congress must reach agreement on funding legislation by Monday night to avoid most federal agencies closing on Tuesday.

( Read a transcript of Cruz’s remarks on Tuesday. )

Meanwhile, a similarly contentious debate is simmering over raising the federal debt ceiling, with Treasury Secretary Jack Lew warning Wednesday that the nation will exhaust its emergency borrowing capacity no later than Oct. 17.

Here's what some agencies have said about their specific plans in case of a government shutdown.

Despite urging from some of his colleagues not to stage the talkathon, Cruz took the floor Tuesday afternoon promising to speak against the health-care law “until I am no longer able to stand.”

To most Americans, it looked like a traditional filibuster, fixed in the popular imagination by Jimmy Stewart’s performance in “Mr. Smith Goes to Washington.” But parliamentary procedures already in place meant that Cruz eventually would have to yield the floor.

Cruz’s controversial strategy shrank the window available for House Speaker John A. Boehner (R-Ohio) and his colleagues to respond with a different version of the legislation.

(INTERACTIVE: Longest filibusters of all time )

By 5 a.m., the length of Cruz’s marathon discourse had surpassed lengthy filibusters by Sen. Rand Paul (R-Ky.) in March and the late Sen. Robert C. Byrd (D-W.Va.) in 1964. He earned a lead spot on all three network morning news shows, acknowledging that he was “a little bit” tired but still looking remarkably fresh. The television anchors dubbed Cruz’s effort a “talkathon,” even as they explained to viewers that his effort would not derail the legislative process.

The senator, still wearing the dark suit and light blue tie he had donned the previous day, kept his composure throughout his marathon presentation.

The Cruz talkathon was the latest example of the increasingly stark division among Republicans, both on Capitol Hill and nationally. The Texas newcomer, just 42 and nine months into his first term in office, is carrying the banner for conservatives who urge a take-no-prisoners approach in confronting the president, even if it means shuttering the government.

But the move angered senior Republicans, who complained that Cruz and the other junior senators pushing this strategy did not understand the wounds the GOP suffered during the mid-1990s shutdown battles with President Bill Clinton. Back then, the party controlled both the House and Senate, a luxury compared with its tenuous majority in the House today.

“I just don’t believe anybody benefits from shutting the government down, and certainly Republicans don’t. We learned that in 1995,” said Sen. Orrin G. Hatch (Utah), the dean of the GOP caucus. “We’re in the minority. We have to find a way of standing up for our principles without immolating ourselves in front of everybody, in a way when we don’t have the votes to do it.”

Some suggested that the clashing approaches were the latest evidence of a party adrift, both on policy and strategic thinking. “We haven’t had much of a strategy on anything to this point. Everybody’s shooting from the hip,” said Sen. Saxby Chambliss (R-Ga.).

Boehner and Senate Minority Leader Mitch McConnell (R-Ky.) originally preferred a different approach that would have required Democrats to vote for the health-care funds, while GOP senators could have symbolically opposed.

Cruz played a leading role, along with outside conservative groups, in pushing House Republicans to take a harder line. House Republicans on Friday passed a bill without funding for Obamacare, exactly as Cruz wanted.

McConnell had hoped that he could get Cruz and his band of allies to relent so that the Senate could pass something by Friday. He even convened an extra meeting, in addition to the weekly Tuesday policy luncheon, at which several senators said Cruz was urged to drop some of his delaying tactics so that Boehner could get the legislation before late Sunday or early Monday.

But Cruz would not budge.

“We don’t need fake fights. We don’t need fake votes. We need real change. We need a better economy. We need more jobs,” Cruz said early Tuesday afternoon, rejecting the original Boehner-McConnell plan.

All through the night and well into the morning, Cruz’s oratory touched on a broad mix of subjects and sources, including lyrics from a song by country music star Toby Keith; quotations from the popular reality television show “Duck Dynasty;” recollections of how his father, Rafael Cruz, used to make green eggs and ham for breakfast; and a recent acceptance speech by actor Ashton Kutcher at an awards show.

At one point Tuesday night, Cruz opted to read bedtime stories to his two young daughters, who he said were home in Texas watching television with his wife. Cruz first read King Solomon’s Wise Words from the Book of Proverbs and then the Dr. Seuss classic “Green Eggs and Ham,” which he said was one of his favorite children’s books.

Several times Cruz read supportive messages sent to his office via Twitter.

Cruz was permitted to yield to colleagues for long-form questions but could not leave the floor or sit while his effort was under way.

Several like-minded Senate conservatives took turns giving him respite Tuesday evening, including Paul and Sen. Marco Rubio (R-Fla.), two 2016 presidential aspirants. Rubio returned to the Senate floor Wednesday morning, along with Sen. James M. Inhofe (R-Okla.).

Cruz’s most frequent partner has been Sen. Mike Lee (R-Utah), who at times phrased “questions” that stretched for almost an hour and included detailed critiques of Supreme Court decisions and a series of recollections from his younger years, all designed to draw attention to his concerns about the health-care law.

The extended discourse by Cruz and Lee is the culmination of a strategy they began developing in the summer when Lee, first elected in 2010, started looking for allies to defund the health-care law by using annual spending bills for federal agencies as potential leverage.

Lee and Cruz launched a commercial campaign that targeted fellow Republicans with ads designed to pressure GOP senators to support the pair’s shutdown strategy. Senior colleagues have rejected the approach, and instead have grown more angry.

A series of junior Democratic senators presided over the Senate chamber through the night, as Cruz talked on and on and on. Sen. Elizabeth Warren (Mass.) passed the time scanning her iPad. Reporters spotted Sen. Chris Murphy (Conn.) returning to the U.S. Capitol shortly before 11 p.m. with a Red Bull in hand.

“There’s no point to this other than advancing the career of one or two senators,” Murphy said as he wrapped up his two-hour shift around 1 a.m.

As dawn neared, Cruz began leaning more on the podium at his desk, which was surrounded by binders and stacks of paper. In case he ever lost his sense of place, a large yellow Post-it note reminded him in blue ink: “Yield only for the purpose of a question. Be careful!”

Rosalind Helderman and Jeff Simon contributed to this report.

RELATED: 25 leading conservative voices