Congressional negotiators on Friday closed in on a bipartisan deal that would rebuff President Trump’s demands for more than $5 billion for his border wall, as lawmakers recovering from one government shutdown struggled to avoid another one.

The deal taking shape on Capitol Hill would offer Trump no more than $2 billion for barriers along the U.S.-Mexico border, people involved said, with Democrats suggesting the figure would be even lower. Lawmakers hope to finalize it by Monday to allow time for it to pass Congress and reach Trump’s desk before a Feb. 15 deadline.

Lawmakers were discussing repairing existing border fencing and potentially adding to stretches of levee walls topped with metal bollards that already line portions of the southern border. The exact mix of new and improved barriers remained unclear but was certain to fall short of the 200-plus miles of steel walls Trump has demanded.

“I can tell you this just for sure: It’s not $5.7 billion for the wall. It’s not anywhere close,” said Rep. Henry Cuellar (D-Tex.), a member of the 17-member bipartisan committee working on the issue. “We want to add money for technology, ports and all of that, yes. There’s a lot of money. But is there money for $5.7 [billion] just for the wall? No. Not even close.”

The agreement, if finalized, would test Trump’s resolve on a central issue of his presidency — the wall — and his willingness to compromise after forcing the nation’s longest-ever government shutdown in a failed attempt to fund it. Whether he would go along with the deal remained unclear. The president faces pressure from GOP leaders to steer clear of another shutdown, but portions of his base demand that he hold firm on the wall. The president insists a wall is necessary to deter undocumented immigration.

At the same time, Democrats newly in control of the House are determined to deny Trump a victory on an issue that their own base strongly opposes.

Whether Trump chooses compromise or renewed confrontation, the outcome will likely set the tone for much of what is to come, as Congress faces more looming deadlines, including the need to lift the federal borrowing limit to avoid a catastrophic default on U.S. obligations.

The government is currently operating on a short-term spending bill that Trump signed Jan. 25 when he ended the 35-day government shutdown without obtaining any new wall money. At the time, he gave lawmakers three weeks and an ultimatum: Produce adequate wall money, or face another shutdown or a national emergency declaration that the president says would allow him to circumvent Congress and use the military to build his wall.

Those three weeks of funding run out Feb. 15 at midnight. Unless Congress and Trump act, large portions of the federal government, including the Department of Homeland Security, will then run out of money and begin to shut down.

Senate Majority Leader Mitch McConnell (R-Ky.) and other GOP leaders are determined to avoid another shutdown, and they also have cautioned Trump against using emergency powers that could set a dangerous precedent for future Democratic presidents and result in an embarrassing vote of disapproval on the Senate floor.

Details of the emerging agreement remained fluid Friday. Two people familiar with the talks said the understanding among Republicans was that the deal would offer about $2 billion for border barriers. The people spoke on the condition of anonymity to describe the private deliberations.

But Democrats disputed that figure, saying it was too high and that negotiations were ongoing. “We will not agree to $2 billion in funding for barriers,” said Evan Hollander, spokesman for House Appropriations Chairwoman Nita M. Lowey (D-N.Y.), who is leading the talks. Before entering the most recent round of negotiations, Democrats had backed $1.3 billion for a mix of new and improved barriers along the U.S.-Mexico border.

Either way, it was clear negotiators were preparing to come in far below Trump’s demands, raising the question of whether the president would agree to their deal. White House spokesmen did not respond to a request for comment, although Republican lawmakers who have been in touch with the White House have expressed optimism in recent days about the president’s assent.

“It’s just a difference of opinion on how to get there, but we all agree on securing the border,” said Rep. Steven M. Palazzo (R-Miss.), one of the negotiators. “And a majority of us, I think 100 percent, we do not want to have another government shutdown, and so we’re continuing to work in good faith with one anther.”

There are already more than 600 miles of barriers of various kinds along the U.S.-Mexico border. About half are designed to stop vehicles from crossing, while the other miles are aimed at blocking pedestrians as well. There could be repairs or additions to both varieties of barriers.

People briefed on the White House’s strategy said that the Trump administration had hoped to change the rhetoric during the debate and stop calling any barrier a “wall,” in the hopes that it would make it easier for Democrats to accept more funding. Conservative groups who have backed Trump’s hard line have pushed him to stick to a number that is close to $5.7 billion, but the White House’s precise demands remained unclear.

Trump will speak at his first campaign rally of the year Monday night in El Paso, leading to concerns from some congressional aides that he could veer back to rhetoric on the wall that could throw any deal they reach into question. Trump has proved unpredictable on the issue in the past, signaling he’d go along with a spending bill the Senate passed unanimously in December without wall money but then turning against it amid a conservative backlash and precipitating the shutdown instead.

In addition to the wall, negotiators were working on resolving a number of other issues, many involving U.S. Immigration and Customs Enforcement and its policies. Chief among these was how many detention beds would be funded for the agency, a number Democrats want to cut to limit the agency’s ability to carry out aggressive detention policies.

“The detention beds, all these things we’ve been talking about . . . those things are historic differences that actually have been more divisive in the past than the wall,” said Rep. David E. Price (D-N.C.), one of the negotiators. “Because the Republicans really weren’t particularly pushing the wall in recent years until Trump made it a signature issue.”

Damian Paletta contributed to this report.