A temporary government shutdown was all but guaranteed Friday night as Congress struggled to break a stalemate over money for President Donald Trump's proposed border wall.

Parts of the government will close if Congress cannot pass seven spending bills by midnight Friday. Lawmakers scrambled through the afternoon and into the early evening to break an impasse over whether to fund the barrier on the U.S.-Mexico border.

But the House adjourned at about 7 p.m. ET Friday without passing legislation that the Senate supports, and the chamber is not due back until noon Saturday. Then the Senate adjourned at about 8 p.m. ET without approving a spending bill that the House backs. Senators are expected back at noon Saturday, as well.

The deadlock leaves Washington almost certain to let funding lapse for the third time this year. A closure could last through Christmas and into the new year, past when Democrats take control of the House on Jan. 3. It would send the unified Republican government out in a swirl of chaos that marked Trump's first two years in the White House.

Still, lawmakers could move quickly to pass spending legislation this weekend if leaders reach an agreement. House Republicans told members they would get 24 hours of notice before a vote.

Shortly before 6 p.m. ET Friday, the GOP-controlled Senate voted 48-47 to advance a House-passed bill to keep the government running through Feb. 8 and put more than $5 billion toward the president's wall. Vice President Mike Pence had to break a tie after a vote that lasted five hours and 18 minutes, the longest in Senate history, according to NBC News.

Republicans decided to move the bill forward even though it would have failed in a final vote. Democrats have unequivocally said they will not approve money for the border barrier. Instead, lawmakers aim to use the House-passed bill to "preserve maximum flexibility" as Democrats try to strike a deal with the White House on a spending bill that can pass both the Senate and House, Senate Majority Leader Mitch McConnell said.

"When an agreement is reached, it will receive a vote here on the Senate floor," he said. Both Sens. Bob Corker, R-Tenn., and Jeff Flake, R-Ariz., agreed to advance the measure with the assurance that lawmakers would next vote once they had a plan that could get through both chambers of Congress.

It left negotiators limited time to strike a deal before the shutdown deadline. Trump has promised to "take the mantle" and be "proud" if funding lapses as he tries to secure money for the wall. House Republicans, knowing funding for the barrier would not get through both chambers, approved their bill Thursday after Trump threatened to veto the Senate-passed measure without wall money.

As the procedural Senate vote remained open for hours Friday, Pence, incoming White House chief of staff Mick Mulvaney and Trump's advisor and son-in-law Jared Kusher navigated the Capitol trying to make progress toward a deal. They met with Schumer at the White House's request, a spokesman for the Democrat said.