House Republicans on Thursday were expected to start the process of passing a last-minute bill to keep the government open past Friday, but are still hunting for the votes needed to avoid a partial shutdown, with the help of the Trump administration.

GOP leaders on Wednesday took the temperature of their caucus on whether the bill can pass and seemed comfortable enough to tentatively plan on a Thursday vote.

"I think we are in a good place," said Rep. Rob Walker, R-N.C., who chairs the House GOP's largest faction, the Republican Study Committee. "At this point, we are keeping the Democrats on the run and think it's the best move forward. I think most of the members will support it."

Walker said Trump administration officials and the president are working the phones to push for passage of the temporary funding bill, which would keep the government fully operational until Feb. 16.

But there were several ways the bill could still be derailed, including whether House leaders added enough sweeteners to attract Republican support. The bill being considered would delay Obamacare taxes on medical devices and high-end health plans for two years and delay a tax on Obamacare insurers for one year.

It would also give the Defense Department more flexibility to fund missile defense programs.

But on Wednesday, conservative Republicans were demanding more funding for the military and wanted a separate vote on their vision of how to protect Dreamers, beef up border security, and tighten immigration laws. It's unclear whether or how that demand might be met, and it could require assurances by GOP leaders to quickly hold a vote on the border package to win over Republican members of the House Freedom Caucus.

A top GOP leadership aide said "very productive conversations" are ongoing with Republicans to secure a majority needed to pass the bill, but it is not likely a full immigration deal would be ready by Friday.

Instead, it's more likely additional defense spending will be added to attract the votes of GOP defense hawks.

Securing enough Republican votes is critical to passage, as most Democrats seem likely to oppose it. House Minority Leader Nancy Pelosi, D-Calif., asked all Democrats to oppose the bill, which reflects an anger over the lack of any immigration language in the bill.

Democrats have made it clear the fight is personal for them, as Pelosi said President Trump needs to "stop blaming Democrats" for opposing the bill that would keep the government open.

And in a sign of the blame game that would likely follow a government shutdown, she said it's Republicans who are "stuck in a game of chicken" with the economy.

All drama aside, White House chief of staff John Kelly said Wednesday night that he thinks the votes are there for the bill.

"I spent a fair amount of time on the Hill today speaking to members of Congress, both sides of the aisle ... and it would seem to have the votes to continue funding the military, take care of the child healthcare issue, and perhaps some other things," he said.

But even if that's true, the other major hurdle is whether the bill can get through the Senate. There, Republicans control 51 votes, but need 60 to let the bill advance to a final vote.

That means they need to find at least 9 Democrats to support the bill. Senate Majority Leader Chuck Schumer, D-N.Y., has the same complaint about it that Pelosi does, and he's said almost every Democrat would vote against it.

"We Democrats believe that we want to do everything we can to avoid a shutdown, but we Democrats believe if there is one, it will fall on the Republicans' backs — plain and simple," he said Wednesday. "The overwhelming number in our caucus have said they don't like this deal and they believe if we kick this can down the road this time, we'll be back where we started from next time."

Senate Republicans may need more than 9 votes, as Sen. Lindsey Graham, R-S.C., has said he'd oppose the bill that's being considered.

One of the few positive dynamics for Republicans as they rush to pass a bill over the next two days is loyalty to Trump. Many House Freedom Caucus members support Trump, and could decide to support the bill at the last moment rather than hand Trump an embarrassing shutdown that most would see as a failure of Republicans to find a way forward.

According to one congressional aide, Republicans voting against the bill would be "voting against Trump."

The White House on Wednesday seemed aware of that dynamic. When asked if Trump himself would help move the needle with uncommitted Republicans, White House spokeswoman Sarah Sanders replied, "Yes."