Just moments after we reported that top Congressional democrats and republicans were meeting on Monday night to reach a last minute border funding deal and avert another government shutdown, the negotiators said a bipartisan deal has been reached over border security with Senate Appropriations Chairman Richard Shelby telling reporters that an "agreement in principle" was reached and that staff will work on the deal.

While Shelby did not give any details on what they agreed to regarding border wall and detention beds, he said that will be released when bill text is released and added that the bipartisan border deal will have "some money" for a "barrier" (which appears to be a major step down from wall, and even fence).

However, in a hint that the "deal" may prove be fleeting, Shelby also hedged saying that he "hopes and thinks White House will back the deal."

The breakthrough came after Sens. Shelby (R-Ala.) and Patrick Leahy (D-Vt.) and Reps. Nita Lowey (D-N.Y.) and Kay Granger (R-Texas) — the top members of the Senate and House Appropriations Committee — met three times on Monday night in a last-ditch effort to get a deal, as described below.

“I think everyone will say good work,” Granger said.

Shelby and Leahy, standing side by side as they spoke to reporters earlier Monday evening, indicated that the group thought they were closing in on a deal and could wrap up talks before Tuesday.

"We’re talking about reaching an agreement on all of it," Shelby told reporters.

While negotiators refused to discuss the particulars of the deal and Lowey said staff were still finalizing the details - Lowey said she hopes for legislation to be released on Wednesday - algos responded quickly to the flashing red headline, by buying risk and futures promptly spiked a little after 8pm, sending Dow futs to intraday session highs.

* * *

Just a day after optimism over a compromise funding deal collapsed after border wall talks broke down, making another government shutdown virtually certain, optimism returned on Monday evening when four senior congressional negotiators scheduled a second round of meetings in an attempt to salvage talks over border security funding and avoid another partial U.S. government shutdown, Bloomberg and Politico reported.

With government funding set to expire Friday night for some agencies, resulting in a new government shutdown, top Congressional Democrats and Republicans met Monday afternoon and were returning at 6 p.m. Washington time for more talks.

“We’ve reopened serious negotiations,” said Senate Appropriations Chairman Richard Shelby, who also met during the break with Majority Leader Mitch McConnell and other GOP leaders.

As Bloomberg reported, meeting on Monday were Representative Nita Lowey and Senator Patrick Leahy, both Democrats, and Representative Kay Granger and Shelby, both Republicans. "Let me say very clearly I don’t think Democrats or Republicans want a shutdown,” said Lowey of New York, who characterized the afternoon talks as “sincere."

According to Politico's Burgess Everett, Shelby and Leahy appeared together with reporters late on Monday, signaling they are close, saying "their goal is a new spending deal tonight."

Shelby and Leahy just did an appearance together with reporters, signaling they are close. They said their goal is a new spending deal tonighthttps://t.co/eRrELFjxuR https://t.co/CSPJKtSAbv — Burgess Everett (@burgessev) February 12, 2019

Lowey also said that lawmakers may need to consider passing a stopgap funding extension to keep the agencies operating past Friday should a deal appear unachievable. Negotiators had earlier expressed optimism they could unveil a deal Monday to set up votes in the House and Senate this week.

"I’ll say 50/50 we’ll get a deal,” said Shelby of Alabama, the Senate Appropriations chairman, on “Fox News Sunday.” “I hope and pray we do."

In this case prayer may not be enough.

As we reported yesterday, the sticking point is over the number and purpose of immigration detention beds. Democrats are seeking a cap to force U.S. Immigration and Customs Enforcement, or ICE, to detain criminals instead of undocumented immigrants with no criminal history. Republicans are resisting a limit on the number of beds, contending criminals shouldn’t count toward the total and that ICE should have discretion.

House Democrats said heading into the meeting they wouldn’t accept a stopgap spending bill through September without limits on immigration detention beds and border barriers. Democrats are also demanding language aimed at blocking Trump from shifting funds to pay for the wall, according to a person familiar with the negotiations. The language could stymie executive actions to build the barriers and has become another hitch in the negotiations, the person said.

Without a funding deal, nine federal departments and related agencies would shut down again, just weeks after a record 35-day closing. Negotiators also continue to haggle about the amount of funding for a wall and placement of fencing on the southern U.S. border. Amid the talks, Trump heads to El Paso, Texas, on Monday for a rally “to show Democrats how much Americans demand The WALL,’’ according to a Trump campaign fundraising email on Sunday.

Heading into the weekend, it appeared that negotiators were focused on a proposal with border barrier funding of between $1.3 billion and $2 billion, Bloomberg reported, citing growing optimism about an imminent deal. Details about where the fencing would go and a Democratic request to eliminate previously funded fencing in the National Butterfly Center, a conservation area close to the border in Mission, Texas, were still being negotiated.

The White House and Republicans have been emphasizing that Trump cannot accept less than $2 billion for border barriers. As Democrats consider increasing the funding for barriers, they have also more demands for restrictions on where it can be placed and have kept a demand for a cap on detention beds - something Republicans are resisting.

What scuttled the talks is the new issue over detention beds. There are currently 40,520 ICE immigration detention beds funded by Congress. Heading into the talks, the White House sought to increase the number to 52,000, while Democrats wanted a reduction to 35,520. Democrats proposed a 16,500 cap on beds to be used for interior enforcement, with the rest to be used for those captured at the border, according to people familiar with the talks. A senior Republican aide said Shelby won’t accept an interior cap, and Democrats told Republicans they won’t proceed without one.

Democrats proposed the cap at the beginning of the negotiations, but Republicans were surprised and dismayed that the proposal remained in the latest Democratic offer on Saturday. The initial offer, which had no money for border barriers, was seen a low-ball opening bid.

Democrats said they want to use the cap - which matches an informal one used during the Obama administration - to force ICE to detain criminals rather than undocumented immigrants with no criminal history, including people who’ve overstayed their visas.