(CNN) - Congressional negotiators say they have reached an agreement in principle to avert a partial government shutdown at the end of this week.
The four lead bipartisan negotiators, emerging from talks Monday night, declined to get into details on how the agreement was struck or the exact parameters of a deal, but when asked whether it included barrier funding and a resolution to the detention bed issue, Senate Appropriations Chairman Richard Shelby said: "We got an agreement on all of it."
Shelby's comments follow those from a Democratic aide involved in the border security funding talks who said earlier Monday negotiators are "very, very close" to an agreement and they are now checking to see if the emerging proposal would get the votes it needs to pass the House.
Lawmakers are racing the clock in an effort to find the common ground necessary for an agreement on border security that will pass both chambers of Congress and be signed into law by the President before Friday at midnight to prevent another partial government shutdown.
About 25% of funding for the federal government runs out at the end of the week and a group of bipartisan lawmakers have been meeting for weeks to negotiate over border security as part of the budget for the Department of Homeland Security.
In a sign that made it look like a shutdown was increasingly likely, talks broke down over the weekend, but four members of that group -- the top Democrat and Republican from both the House and Senate Appropriations committees -- kept meeting Monday to try and broker a deal.
Asked what was different today than over the weekend, Rep. Kay Granger, the top House Republican on the conference committee, quipped, "Maybe we got sleep."
"That's always sort of helpful in making a decision," she added.
The looming deadline comes on the heels of the longest shutdown in US government history, which began in December and ended in January after President Donald Trump signed legislation to temporarily reopen shuttered parts of the government for a three-week period to allow for border security negotiations.
What the President will be willing to accept has remained a wild card hanging over the negotiations. Democrats and Republicans on Capitol Hill have long signaled that they could reach a deal if left to their own devices, but questions over what the President will accept have continued to inject uncertainty into the process.
Speaking in El Paso, Texas, on Monday night, Trump said he was made aware of the agreement but didn't listen to the details from advisers.
"They say that progress is being made. Just so you know. Just now, just now," he said. "I said wait a minute, I gotta take care of my people from Texas. I got to go. I don't even want to hear about it. I don't want to hear about it."
Back in Washington, White House officials have mulled one additional idea in recent days, depending on what congressional negotiators came up with: taking the deal that the committee comes to -- depending on what's in it -- but also using other federal funds to build additional barriers.
A White House official says they are keeping their options open right now, including Trump using his executive powers to reallocate federal funds from elsewhere for the wall, but are looking at the agreement now.
As acting chief of staff Mick Mulvaney noted on NBC Sunday, he has been "combing through the law" and trying to find additional funds. White House officials believe this is an option even if the President signs the deal to avoid another government shutdown.
Just hours ago they were told the talks were stalled, but that wasn't a huge concern to White House officials, who for days have been continuing discussions about declaring a national emergency.
Sen. Patrick Leahy, a top Democratic negotiator, said the goal for the four main participants in the talks was to reach a deal Monday night, then proceed to drafting the final agreement on Tuesday.
"I think we both agree if we can wrap this up tonight, do it tonight, our goal will be to do it tomorrow," said Leahy, of Vermont, regarding his work with Shelby.
Any agreement will need to now hold up in the House and Senate and finally the White House.
The Democratic aide said there is still "a ton of work to do once they have an agreement reached" to ready it for the floor.
A Republican aide involved expressed some caution on the progress given the repeated breakdowns over the past few weeks, but acknowledged negotiators "are clearly moving in the right direction."
Another GOP aide said, "Hearing good things tonight."
The most significant sticking point in the shutdown fight so far had been over the President's request of upwards of $5 billion for a border wall. Democrats have made clear that is a non-starter and have refused to meet the President's demand, an impasse that triggered the initial shutdown.
Another sticking point has also emerged over the issue of detention beds for detained undocumented immigrants. Democrats view detention beds as central to a Trump administration immigration policy that is harsh and needlessly aggressive. Republicans view the detention beds as central to limiting the ability of detained undocumented immigrants from being released into the US as they await hearings.
Democrats entered negotiations pushing to reduce the number of detention beds funded in the measure to 35,520, while the White House and Republicans sought an increase to 52,000.
The full details of the tentative agreement struck on Monday evening have yet to be publicly released. But according to a Democratic source, the agreement in principle at this point would include $1.375 billion for physical barriers and a level of 40,520 for overall ICE beds, short of the 52,000 the administration requested and matching current funding levels.
On a potential cap on ICE detention beds, Trump told the crowd in El Paso, "I will never sign a bill that forces the mass release of violent criminals into our country. And I will never abolish or in any way mistreat our great heroes from ICE and Border Patrol and law enforcement."
Rep. David Price, a North Carolina Democrat on the conference committee, said if an agreement was reached on Monday night, both chambers could likely get something to the President's desk before February 15 government funding deadline.
"I know the goal is to reach it tonight," Price said before the announcement of an agreement was made. "I hope we're back on track now with a serious give and take and good faith negotiations."
This story has been updated with additional developments from Monday.
The-CNN-Wire ™ & © 2019 Cable News Network, Inc., a Time Warner Company. All rights reserved.