By Kristina Peterson, Andrew Duehren and Natalie Andrews
WASHINGTON -- Senior lawmakers said Monday night they had reached an agreement in principle on a sweeping deal to end a monthslong fight over border security and avoid a partial government shutdown this weekend.
The top four lawmakers on the House and Senate Appropriations Committees emerged after three closed-door meetings Monday and announced that they had agreed to a framework for all seven spending bills whose funding expires at 12:01 a.m. Saturday.
The deal would include $1.38 billion for 55 miles of modern physical barriers along the border with Mexico, according to congressional aides from both parties.
The deal gives both parties something they had sought. Democrats kept funding for physical barriers along the border far below President Trump's request. But Republicans blocked Democrats' efforts to place certain limits on detention beds, an issue that had derailed the talks over the weekend.
The deal would fund the Homeland Security Department, which oversees the border, and a group of other federal agencies through September, Senate Appropriations Committee Richard Shelby (R., Ala.) said Monday night.
"We reached an agreement in principle between us on Homeland Security and the other six bills," Mr. Shelby said. "Our staffs are going to be working feverishly to put all of the particulars together."
A bipartisan group of 17 lawmakers have been working since the five-week government shutdown ended last month to cut a deal that would end the fight over border security that has been brewing for months. President Trump made building a border wall a central campaign promise and has been vowing to build it, regardless of whether Congress approves the funding.
Speaking at a campaign rally in El Paso, Texas, in an arena just 1,000 feet from the border, Mr. Trump made little mention of the deal in principle reached by a committee of lawmakers to fund the government, saying only that he had been briefed on it before taking the stage. "They say that progress is being made with this committee. I said wait a minute, I got to take care of my people from Texas."
"I don't know what they mean, progress is being made," he said. "It may be progress, it may be not."
Meanwhile, Democrats emboldened by reclaiming the House majority in last year's midterm elections had vowed to resist building a wall, although they had recently signaled they could support some physical barriers. The deal was expected to fund bollard fencing and levee walls, but not a concrete wall, according to congressional aides. The barriers are expected to be built in the Rio Grande Valley sector and wouldn't be erected in highly sensitive areas, aides said.
House Appropriations Committee Chairwoman Nita Lowey (D., N.Y.) said the deal reflected a bipartisan agreement that had the backing of House Speaker Nancy Pelosi (D., Calif.)
"I have confidence that she would be supportive of the agreement," Mrs. Lowey said of Mrs. Pelosi. "I was pleased that we were able to work together in a bipartisan way to come to an agreement." Mrs. Pelosi has said she would back any bipartisan deal to emerge from the group.
Lawmakers said they expected the agreement could be written into legislation that could pass both chambers of Congress before the Friday midnight deadline, avoiding a second partial government shutdown.
The biggest question is likely to be whether Mr. Trump will sign the congressional deal. Mr. Trump had sought $5.7 billion to build a border wall and the agreement's funding is far lower than that. Mr. Shelby said lawmakers had been in regular contact with White House representatives and that Mr. Trump had made clear to him he wanted Congress to send him a deal.
"He told me more than once that if you can work out a legislative solution to this, do it," Mr. Shelby said. "We believe from our dealings with them and the latitude they've given us, they will support it," he said of the White House.
Republicans and Democrats earlier had sparred over the number of beds used for immigrants detained by enforcement authorities. The deal wasn't expected to limit the number of beds that Immigration and Customs Enforcement Officials could use for immigrants detained in the interior of the U.S., as Democrats had sought, according to congressional aides.
The bill would provide funding for about 5,000 more beds than the last spending bill funded but specifies an average daily population that Democrats said would require ICE to reduce the number of beds over the next seven months, aides said. However, the agency could transfer money, as it has been doing, to use more beds.
Lawmakers said the weekend's impasse had raised the specter of another partial shutdown this weekend, motivating them to resuscitate the talks that had broken down.
"What brought us back together tonight, I thought, was we didn't want that to happen," Mr. Shelby said. "The fact that it looked like there was going to be another shutdown imminently probably helped contribute to us getting together tonight."
For months, the public dispute over the border has largely focused on funding levels and the design of border barriers, spurred by Mr. Trump's longstanding call for a wall along the U.S.-Mexico border. But over the weekend, Republicans raised objections to limits that Democrats have long been seeking on the number of beds that would be provided for people detained by ICE officials.
Democrats have wanted to force the Trump administration to prioritize the detention of immigrants with criminal records above those who, for example, overstayed their visas.
"How the government deals with ICE is a very important issue, and that's why the beds are so critical to this negotiation," Mrs. Lowey said earlier Monday.
Democrats had hoped to secure some constraints on ICE as a concession from Republicans, in exchange for meeting GOP demands to build more physical barriers along the border. Republicans had balked at the limits on ICE beds, saying they don't want to restrain the government's capacity to detain criminals.
"This is a poison pill that no administration -- not this one, not the previous one -- would -- or should -- ever accept," Senate Majority Leader Mitch McConnell (R., Ky.) said on the Senate floor. "House Democrats want to set a limit on how many criminal aliens our government can detain."
Democratic aides said that if ICE officials conduct proper vetting, they could detain all the individuals considered the most dangerous.
Mr. Trump remains a wild card, and the latest delays in reaching an agreement had heightened prospects that he would declare a national emergency and seek to divert funds from elsewhere to go toward miles of a wall along the Mexican border. Such a move would meet swift legal challenges, and GOP lawmakers have raised concerns over siphoning military-construction or disaster-aid funds to build the wall.
Mr. Trump has been seeking $5.7 billion to go toward a border wall.
In comments Monday, Mr. Trump said Democrats "don't want to give us the beds," adding: "We need a wall or else it's not going to work."
Asked if there would be another shutdown, which Mr. Trump ended weeks ago when he agreed to a three-week stopgap measure with no border-wall funding, the GOP president sought to direct any blame away from the White House. "That's up to the Democrats," he said.
Lawmakers have little appetite to shut the government, having just endured a 35-day partial shutdown in which hundreds of thousands of federal employees were furloughed or forced to work without pay.
--Louise Radnofsky and Peter Nicholas contributed to this article.
Write to Kristina Peterson at email@example.com, Andrew Duehren at firstname.lastname@example.org and Natalie Andrews at Natalie.Andrews@wsj.com