WASHINGTON — The House and Senate left Capitol Hill Friday evening without reaching a stopgap funding deal, essentially guaranteeing a partial government shutdown at midnight for the third time in two years.

The move followed a vote to open debate in the Senate on a temporary funding bill — a move that left an open channel with the White House for negotiations.

The vote on the bill, which included $5 billion in border wall funding, was held open for more than five hours. It ended just before 6 p.m., when Vice President Mike Pence broke a 47-47 tie vote.

Senate Majority Leader Mitch McConnell, R-Ky., said the chamber voted to proceed “in order to preserve maximum flexibility for productive conversation to continue between the White House and our Democratic colleagues.”

“I hope Senate Democrats will work with the White House on an agreement that can pass both houses of congress and receive the president’s signature,” McConnell said in remarks on the floor after the vote was closed. “When an agreement is reached, it will receive a vote here on the Senate floor.”

Senate Minority Leader Chuck Schumer, D-N.Y., countered that Democrats had already offered three proposals to keep the government funded, including one that passed the upper chamber on Wednesday.

“We are willing to continue discussions on those proposals,” with the White House and other congressional leaders, he said.

The House, which has also adjourned for the night, is expected to be in session Saturday around noon. Senators have been told they will be given 24-hour notice before any vote takes place.

The bill passed by the House Thursday night with $5 billion in wall funding would not make it through the Senate because it requires 60 votes to advance to final passage. Republicans maintain a 51-seat majority in the Senate and need nine Democrats to advance legislation.

“There is no path forward for the House bill,” Sen. Jeff Flake, R-Ariz., said. “The only path forward is to a bill that has an agreement between the president and both houses of Congress. And the next time we vote will be on the agreement, not another test vote."

The development about six hours before the midnight deadline to prevent a shutdown followed talks late Friday afternoon at the Capitol, as Pence and top White House officials moved back and forth between the House and Senate.

Frustration was apparent among senators and staff on Capitol Hill earlier, as the path to avoid a partial government shutdown was far from clear, with McConnell proudly brandishing a red pin that read “Senate cranky coalition.”

Senators had already passed a short-term spending bill, known as a continuing resolution that extends the previous year’s spending levels, on the seven remaining appropriations bills until February 8. But after conservatives publicly berated Trump for caving on the border wall, the president derailed the process.

After an hour-and-a-half meeting at the White House with the president and half a dozen Republicans, Republicans came back echoing the president's message that it was up to Schumer and Democrats to avert a partial shutdown.

By mid-afternoon, after retiring Sens. Bob Corker, R-Tenn., and Flake threatened to derail the procedural vote to advance the government funding bill, Pence, as well as incoming White House chief of staff Mick Mulvaney and White House senior adviser Jared Kushner arrived on Capitol Hill to re-start talks.

The White House officials met first with Senate Minority Leader Chuck Schumer, D-N.Y., on Capitol Hill, and then with Speaker Paul Ryan, R-Wis., and other key Republicans.

But mistrust was abundant on the Hill, where the president has previously undercut his vice president in negotiations, blowing up numerous previous handshake deals on legislation.

Earlier Friday, Trump said at a signing ceremony of a bipartisan criminal justice reform bill at the White House that “chances are probably very good” for a shutdown.

"It's on the Democrats. It's a Democratic shutdown," Trump said. "Now it's up to the Democrats. We're prepared for a very long shutdown."

On Friday morning, Trump had also called again on McConnell to invoke the nuclear option and kill the Senate rule that effectively requires 60 votes in the Senate to pass appropriations bills — a demand that McConnell has dismissed numerous times.

Shutdown today if Democrats do not vote for Border Security! — Donald J. Trump (@realDonaldTrump) December 21, 2018

The Democrats, whose votes we need in the Senate, will probably vote against Border Security and the Wall even though they know it is DESPERATELY NEEDED. If the Dems vote no, there will be a shutdown that will last for a very long time. People don’t want Open Borders and Crime! — Donald J. Trump (@realDonaldTrump) December 21, 2018

Ahead of the vote, Schumer said there wasn't enough Senate support "for an expensive, taxpayer-funded border wall."

"President Trump, you will not get your wall," he said on the Senate floor Friday. "Abandon your shutdown strategy. You’re not getting your wall today, next week or on Jan 3."