WASHINGTON (AP) — After a rare lashing from conservatives, President Donald Trump declared Thursday he would not sign a bill to keep funding the government because it fails to provide billions for a border wall with Mexico, throwing Congress into deep disarray and risking a federal shutdown this weekend.

Conservatives want to keep fighting for the money to pay for the wall as a last act of the GOP-led Congress before Democrats take House control in January. They warn that "caving" on Trump's repeated wall promises could hurt his 2020 re-election chances, and other Republicans' as well.

Trump's sudden rejection of the legislation, after days of mixed messages, sent Republican leaders scrambling for options back on Capitol Hill.

House Speaker Paul Ryan, exiting a hastily called meeting with Trump and other GOP lawmakers at the White House, said, "We're going to go back and work on adding border security to this, also keeping the government open, because we do want to see an agreement."

By afternoon, Trump shifted his terminology, saying he's not necessarily demanding a border wall but "steel slats" — which is similar to the border security fencing already provided for in the bill.

"I give them a little bit of an out, 'steel slats,'" Trump said during a farm bill signing at the White House. "We don't use the word 'wall' necessarily, but it has to be something special to do the job."

The nuance could provide Trump a way to try to proclaim victory. The bill would keep funding at current levels, $1.3 billion, for border security, including pedestrian fencing and replacement fences, not his border wall. It requires only previously used designs.

The House had been set to vote Thursday, before a midnight Friday deadline to fund parts of the government or risk a partial shutdown just before Christmas. The Senate has already approved the bill, which would fund the government to Feb. 8.

House Republicans adopted the last-ditch idea of adding Trump's $5 billion demand to the bill, along with an $8 billion disaster aid package that many lawmakers support for coastal hurricanes and California wildfires. The plan would be to send the new package to the Senate. GOP Whip Steve Scalise, R-La., said House Republicans would vote late Thursday.

But it was unclear if such a package could pass the House, where some Republicans oppose more border wall funding and others were visibly frustrated by the messy lurch of events. And it would not likely be approved in the Senate because Democrats have already resisted Trump's $5 billion, as Senate Minority Leader Chuck Schumer call it "ineffective, unnecessary and exorbitantly expensive," and many senators have already left for the holidays. It would, however, give some House Republicans a release valve for their desire to vote for the wall funding.

Without a deal, more than 800,000 federal workers would face furloughs or be forced to work without pay, disrupting government operations at year-end.

Senate Majority Leader Mitch McConnell, R-Ky., met with Ryan after the House leaders returned from the meeting with Trump. Senators were advised they could be called back to the Capitol Friday for another vote.

Ryan and Majority Leader Kevin McCarthy had endured complaints during a private morning meeting earlier Thursday from rank-and-file Republicans in the Capitol complaining that they were closing out their majority without a fight on a major issue.

Trump interrupted the basement session with a phone call to Ryan, and then the president lashed out at Republican leaders on Twitter.

Ryan had promised a "big fight" after November's midterm elections, but as Republicans lost House control, negotiations over the year-end spending bill have largely been between Trump and Democrats.

"I was promised the Wall and Border Security by leadership," Trump tweeted. "Would be done by end of year (NOW). It didn't happen! We foolishly fight for Border Security for other countries - but not for our beloved U.S.A. Not good!"

"Republicans are in a state of disarray," said House Democratic Minority Leader Nancy Pelosi, who is poised to become speaker when Democrats take control Jan. 3. "Wall funding is a non-starter."

The temporary funding bill would keep government running to Feb. 8, but some House Republicans say they must fight for the wall now. Like Trump, they're facing enormous criticism from high-profile conservatives on an issue that was central to his presidential campaign.

Rep. Mark Meadows, R-N.C., a leader of the House Freedom Caucus, said Trump should veto the funding bill if it passes without wall money.

"I'm not afraid of losing the vote, but I am afraid of not fighting," said Rep. Roger Williams, R-Texas. "That's how this president got in. We want a secure border. It's not the time to quit."

With Pelosi's backing the Senate-passed bill likely has enough support for House approval with votes mostly from Democratic lawmakers, who are still the minority, and some Republicans.

Trump has bounced back and forth with mixed messages. Just last week he said he would be "proud" to shut down the government over it. Earlier this week he appeared to shelve his shutdown threats, with the White House saying he was open to reviewing whatever bill Congress could send him.

Before turning on fellow Republicans, Trump had been directing his ire at Democrats, tweeting that they were "putting politics over country."

Pelosi and Senate Minority Leader Chuck Schumer of New York have made it clear they will not support money for Trump's wall.

"We want smart, effective border security," Schumer said. "That's not a wall."

At issue in the current fight is money for nine of 15 Cabinet-level departments and dozens of agencies, including the departments of Homeland Security, Transportation, Interior, Agriculture, State and Justice, as well as national parks and forests.

Many agencies, including the Pentagon and the departments of Veterans Affairs and Health and Human Services, are covered for the year and would continue to operate as usual if funding lapses. The U.S. Postal Service, busy delivering packages for the holiday season, would not be affected by any government shutdown because it's an independent agency.

The president also put Democrats on notice Thursday about their agenda for the new year, saying he "will not sign any of their legislation, including infrastructure, unless it has perfect Border Security."

More From K2 Radio