WASHINGTON (AP) — With last-minute efforts to avert a government shutdown in disarray, the White House suggested Thursday that President Donald Trump is not onboard with a critical spending agreement because it lacks billions of dollars for “steel slats or a wall” at the Mexican border.

Trump himself lashed out at Republican leaders on Twitter after speaking by telephone with GOP House Speaker Paul Ryan. Then Trump’s press secretary issued a statement saying the president “does not want to go further without border security,” including money for the wall.

Trump, who has faced rare, bitter criticism from some fellow Republicans over the past day for “caving” on wall funding, was to meet with House GOP members at midday and “is continuing to weigh his options,” the White House statement said.

As House Republicans struggled to find the votes to pass the legislation ahead of a midnight Friday deadline, Trump started blaming GOP leaders for failing to deliver on the $5 billion he had demanded for the wall. Ryan had promised a “big fight” after the 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 shortly after calling Ryan during a morning meeting of House Republicans. “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!”

The day’s schedule was thrown into chaos. A morning press conference of GOP leaders was abruptly canceled as lawmakers filed out of a basement meeting to head to the floor for other matters. Voting was not set.

“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 it’s better to fight for the border wall now, before they relinquish their majority to Democrats in the new year. Facing enormous criticism from high-profile conservative media figures, they don’t want to leave town without one last fight over the border wall.

Rep. Warren Davidson, an Ohio Republican and House Freedom Caucus member, said some Republicans want to “continue to fight for wins we promised the American people we would get.”

“I don’t know anybody that’s ready to vote for this,” he said.

Members of the hard-right Freedom Caucus have been urging Trump to insist on money for the border wall with Mexico. Rep. Mark Meadows, R-N.C., a leader of the group, said Trump should veto the funding bill if it passes.

“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.”

Without a deal, more than 800,000 federal workers would face furloughs or be forced to work without pay, disrupting government operations days before Christmas.

Trump has not indicated whether he would sign or veto the legislation if it is approved. With Pelosi’s backing the bill likely has enough support to pass with votes mostly from Democratic lawmakers, who are still the minority, and some Republicans.

The White House had previously indicated that Trump was open to reviewing whatever Congress could send him. But the president did not immediately weigh in on the short-term spending plan, which would fund government past Friday’s deadline to Feb. 8. The Senate passed the bill Wednesday.

Trump in an early morning tweet on Thursday had appeared to focus on other aspects of border security, and not just the wall.

“With so much talk about the Wall, people are losing sight of the great job being done on our Southern Border by Border Patrol, ICE and our great Military,” Trump tweeted. “Remember the Caravans? Well, they didn’t get through and none are forming or on their way. Border is tight. Fake News silent!”

Trump appeared earlier in the week to shelve his shutdown threats after promising a fight over the wall, a project central to his presidential campaign. Just last week Trump said he would be “proud” to shut down the government over it. Some of his allies described the move as caving on his pledge and they expressed concern it could hurt Trump’s 2020 prospects.

Meadows said Trump’s political base “will just go crazy” if he signs a stopgap bill without the wall money.

Meadows added on Fox News, “A lot of people are very nervous this morning about whether the president will cave or not.”

Trump had been directing his ire at Democrats, tweeting that they were “putting politics over country.”

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.”

Trump wanted $5 billion. The bill keeps funding at current levels, $1.3 billion, for border security and fencing, but not for the wall.

Senate Majority Leader Mitch McConnell, R-Ky., has said passing the stopgap funding bill would show that Republicans, still in control of the House and Senate, could finish the year by not prolonging a potential crisis.

It was unclear how many House members might return for votes. Some 70 members missed Wednesday’s session, almost as many Democrats as Republicans.

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

Schumer said Democrats oppose Trump’s border demands because the wall is “inefficient” and because Trump, as a candidate, promised that Mexico would pay for it, which Mexico has refused to do.

“We want smart, effective border security,” Schumer said. “That’s not a wall.”

Congress did pass legislation to fund much of the government through the current budget year, until next Oct. 1.

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. 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.

___

Associated Press writers Alan Fram and Kevin Freking in Washington contributed to this report.