Alice Ollstein contributed to this story, which was last updated at 10:00 p.m. EST.

House Republicans pushed through a bill to keep the government running for one more month Thursday evening, setting up a Friday showdown in the Senate where its prospects look uncertain at best.

The bill passed mostly along partisan lines, by a 230-197 margin. Five moderate Democrats voted for the bill, while 11 Republicans voted against it, most of them conservative hardliners.

It now faces a tough path in the Senate with just hours before a midnight Friday shutdown deadline. Democrats are confident they have more than enough votes to block it.

“There’s near zero chance of this thing passing,” Sen. Sheldon Whitehouse (D-RI) told TPM as he left for the night.

And while a number of red-state members wouldn’t say how they’ll vote as they exited the floor late Thursday night, enough were adamant no votes that its prospects looked bleak.

“Congress needs to do its job. We’ve had 110 days of this dilly dallying. We need to do what we were elected to do which is pass a budget,” Sen. Jon Tester (D-MT) told reporters, promising to vote against the bill.

Senate Minority Leader Chuck Schumer (D-NY) floated a short-term bill to fund the government for a “few days” to give negotiators a chance at hammering out a bipartisan agreement, an idea members of both parties didn’t rule out.

“I don’t think anybody knows” how the vote will play out, Sen. John Kennedy (R-LA) told reporters. “The gut check time will be on cloture tomorrow.”

And what happens if this bill fails?

“Then I guess it’s back to the drawing board,” Sen. John Thune (R-SD), a member of GOP leadership, told reporters.

The bill’s passage through the House came after days of cajoling and negotiations between Ryan and the hardline conservative members of the House Freedom Caucus, a handful of whom still bucked Ryan on the vote even after President Trump called into their Thursday afternoon meeting to encourage them to vote for it. Its passage was made possible after Ryan acquiesced to some Freedom Caucus demands on military spending and giving a conservative immigration reform plan a floor vote. It also includes funding for the Children’s Health Insurance Program for the next six years.

Democrats stood nearly united against the bill because of the GOP’s refusal to consider a bipartisan compromise that would reinstate legal status for more than 700,000 undocumented immigrants who came to the U.S. as children. They face losing their legal status protections because of Trump’s decision to end the Deferred Action for Childhood Arrivals program.

The Senate almost immediately began debate on the bill, with both sides posturing and blaming the other side as they braced for a possible shutdown.

“Democratic senators’ fixation on illegal immigration has already blocked us from making progress on long-term spending talks,” Senate Majority Leader Mitch McConnell (R-KY) said. “Some senators are holding the entire country hostage until we arrive at a solution to a problem that doest fully materialize until march. Military families, veterans and children benefiting from the SCHIP program don’t need to be shoved aside.”

Senate Minority Leader Chuck Schumer (D-NY) fired back.

“We all know what the problem is. It’s complete disarray on the Republican side,” he said, slamming Republicans for making no progress after passing three earlier continuing resolutions to fund the government in recent months.

The House vote is a victory for House Speaker Paul Ryan (R-WI), though it may prove pyrrhic if it fails in the Senate.

“The only thing standing in the way of government funding, resources for our troops, and health care for children right now is Senate Democrats. The House did the right thing,” Ryan said in a statement released immediately after the vote.

Three Senate Republicans have said they won’t back it, and Democrats believe they have more than enough votes to keep the bill far from the 60 votes it needs, with the GOP needing at least a dozen (and likely more like 14) Senate Democrats to break with their party and support the legislation.

“At some point, Congress needs to do better than government-by-crisis, short-term fixes, and sidestepping difficult issues. That time is now,” Sen. Chris Coons (D-DE) said in a statement that reflected the feelings of many Democrats. “The short-term bill that House Republicans passed tonight simply doesn’t meet the test of basic governance.”

Republicans hope that now that the bill has passed the House, they’ll be able to portray the Democrats opposing the bill as obstructionists threatening to shut down the government and pressure enough of them to vote for it to squeeze through passage.

“Senate Democrats need to take this seriously and they need to not shut the government down,” Ryan said at a post-vote press availability. “Do not hold kids or the military hostage.”

But that’s far from certain, and it’s unclear if the bill fails in the Senate what the next step will be.