WASHINGTON — White House negotiators left the Capitol late Friday, and the House and Senate adjourned without a spending deal, all but ensuring a partial government shutdown at midnight with President Donald Trump demanding billions of dollars for his long-promised Mexican border wall.

Trump's top envoys were straining to broker a last-minute compromise with Democrats and some of their own Republican Party's lawmakers. But Vice President Mike Pence, incoming White House chief of staff Mick Mulvaney and senior adviser Jared Kushner departed after hours spent dashing back and forth, with no outward signs of an agreement.

The shutdown, scheduled for midnight, would disrupt government operations and leave hundreds of thousands of federal workers furloughed or forced to work without pay just days before Christmas. Senators passed legislation ensuring workers receive back pay; it will be sent to the House.

At a White House bill signing, Trump said the government was "totally prepared for a very long shutdown," though hardly anyone thought a lengthy shutdown was likely.

The president tried to pin the blame on Democrats, even though just last week he said he would be "proud" to claim ownership of a shutdown in a fight for the wall. Campaigning for office two years ago, he had declared the wall would go up "so fast it will make your head spin." He also promised Mexico would pay for it, which Mexico has said it will never do.

"This is our only chance that we'll ever have, in our opinion, because of the world and the way it breaks out, to get great border security," Trump said Friday at the White House. Democrats will take control of the House in January, and they oppose major funding for wall construction.

Looking for a way to claim victory, Trump said he would accept money for a "steel slat barrier" with spikes on the top, which he said would be just as effective as a "wall" and "at the same time beautiful."

Congress is planning to be back in session Saturday, but no votes were scheduled. Lawmakers were told they would be given 24-hour notice to return to Washington.

Sen. Richard Shelby, R-Ala., the chairman of the Appropriations Committee, left negotiations calling the chances of an accord by midnight "probably slim."

Trump convened Republican senators for a morning meeting, but the lengthy back-and-forth did not appear to set a strategy for moving forward. He has demanded $5.7 billion.

"I was in an hour meeting on that and there was no conclusion," said Sen. Chuck Grassley, R-Iowa.

Senate Majority Leader Mitch McConnell quickly set in motion a procedural vote on a House Republican package that would give Trump the money he wants for the wall, but it was not expected to pass.

To underscore the difficulty, that Senate vote to proceed was stuck in a long holding pattern as senators were being recalled to Washington. They had already approved a bipartisan package earlier this week that would continue existing border security funding, at $1.3 billion, but without new money for Trump's wall. Many were home for the holidays.

After a marathon five-hour delay Pence cast a tie-breaking vote that loosened the logjam, kick-starting negotiations that senators hoped could produce a resolution.

Amid the impasse, Pence and the others were dispatched to the Capitol to meet with Senate Minority Leader Chuck Schumer, who told them Trump's demands for wall money would not pass the Senate, according to the senator's spokesman.

The Senate was expected to reject the House measure because Democratic votes are needed and McConnell showed little interest in changing the rules — as Trump proposed — to allow a simple majority for passage.

One possibility was that the Senate might strip the border wall funds out of the package, pass it and send it back to the House. House lawmakers were told to remain in town on call.

Another idea was to revive an earlier bipartisan Senate bill with $1.6 billion for border security but not the wall.

"The biggest problem is, we just don't know what the president will sign," said Sen. Jeff Flake, R-Ariz.

At issue is funding 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 funded for the year and would continue to operate as usual. The U.S. Postal Service would not be affected because it's an independent agency.