Now that Sen. Ted Cruz, R-Texas, has concluded his marathon speech opposing a government spending bill that includes funding for Obamacare, lawmakers in both chambers are plotting the next steps in a legislative battle that could lead to a government shutdown next week.

Senators followed Cruz's quasi-filibuster by voting unanimously to open debate on a short-term spending bill that would keep the government open until Nov. 15 and which Democrats will eventually amend to restore money for Obamacare.

Senators can continue debating the measure until Thursday evening, when a second vote is held on whether to cut off debate.

Cruz and a small faction of conservative Republicans are planning to vote against ending debate in an effort to delay or block a final vote on the spending measure. But because they would need 41 votes in the Democratic chamber, the spending bill is likely to pass the Senate no later than Saturday.

But before it ends up back in the House, Senate Majority Leader Harry Reid, D-Nev., plans introduce a substitute amendment that will strip out House-passed language to defund Obamacare.

He'll need only 51 votes to pass the amendment and since Democrats usually control 55 votes, the amendment is expected to pass.

That leaves the House with a spending bill it may have to amend again to win the support of a conservative faction determined to stop or delay the health care law, which they deem costly, unpopular and damaging to the economy.

But the House and Senate don't have time to keep sending bills back and forth. The fiscal year runs out Tuesday and if a spending bill isn't approved by then the government will run out of money and will have to shut down.

Both Republicans and Democrats in the Senate have discussed shortening the debate time and sending the amended Senate bill back to the House more quickly, but they have not yet agreed to an abbreviated process.

Before concluding his all-night floor speech, Cruz requested that the Senate vote on Friday, but not to meet the looming deadline.

"I think the best chance to defeat … the bill, is for this vote to be visible to the American people," Cruz said. "Friday afternoon, a lot more of the American people are paying attention than during football games on Saturday, when people are paying attention to other things."