The House of Representatives approved stopgap legislation Thursday meant to avert a partial government shutdown ahead of a midnight Friday deadline.

The bill, also known as a continuing resolution, would keep federal agencies functioning for an additional two weeks through Dec. 22, and Senate approval is expected to follow.

“We expect a clean [continuing resolution] to pass with Democratic support,” White House press secretary Sarah Sanders told reporters Thursday. “We hope Democrats play by the ‘Schumer Rule’ and not hold a bill hostage by playing partisan politics.”

The bill passed 235-193, with 18 Republicans voting against it and 14 Democrats voting for it.

While the bill keeps the government running for now, it would set up a pre-Christmas showdown later this month.

On Thursday afternoon, Trump and the so-called “Big Four” congressional leaders—Senate Majority Leader Mitch McConnell, R-Ky.; Senate Minority Leader Chuck Schumer, D-N.Y.; House Speaker Paul Ryan, R-Wis.; and House Minority Leader Nancy Pelosi, D-Calif., met at the White House to discuss a strategy to avoid a government shutdown after the stopgap expires. Pelosi and Schumer left the White House without speaking to reporters.

The two-week bill is aimed at giving negotiators more time to settle differences. The measure also makes money available to several states that are running out of funds for the Children’s Health Insurance Program, a widely popular program that provides medical care to more than 8 million children.

Most House Democrats were likely to oppose the short-term bill, but enough were expected to support it in the Senate to allow its passage there, with the idea that Democrats would have some leverage to insist on future spending boosts for health care, infrastructure and other domestic programs that would match increases Republicans want for defense.

For its part, the White House has indicated Trump will sign the two-week spending extension and laid out its goals for upcoming budget bargaining. It said money for the military including missile defense and security along the border with Mexico “must be prioritized in a long-term funding agreement.”

Pelosi also told reporters Thursday that lawmakers “will not leave here” without a deal to help immigrants who came to the U.S. illegally as children and are enrolled in the Deferred Action Childhood Arrivals (DACA) program, which Trump ended three months ago.

But Trump unexpectedly tossed a political hand grenade into the mix when he told reporters that a shutdown “could happen” and blamed Democrats. He said they want “illegal immigrants pouring into our country, bringing with them crime, tremendous amounts of crime.”

In response, Pelosi tweeted that Trump was “the only person talking about a government shutdown.”

Last week, the president invited the same group to the White House to discuss a bipartisan budget deal – but Schumer and Pelosi decided not to show.

Trump accused the Democratic leaders of being “all talk” and “no action.”

“And now, it’s even worse. Now it’s not even talk. So they’re not showing up for the meeting,” Trump told reporters last week. The president was sure to keep two empty seats with the Democratic leaders’ name tags on either side of him in an apparent effort to shame them for boycotting the meeting.

The Associated Press contributed to this report.

Brooke Singman is a Politics Reporter for Fox News. Follow her on Twitter at @brookefoxnews.