Senior lawmakers announced a tentative agreement Thursday on an almost $1.4 trillion government-wide spending bill that would stave off a federal shutdown next weekend and split the differences on a number of contentious issues.

The handshake agreement was announced by the chairwoman of the House Appropriations Committee, Rep. Nita Lowey, D-N.Y., and other top members of Congress.

“There’s a meeting of the minds,” Lowey said.

Details of the agreement were not announced and processing the sweeping measure is sure to take a few days. But it would award President Donald Trump with $1.4 billion in additional money for the U.S.-Mexico border wall while giving the Democrats who control the House a number of their priorities such as expanded Head Start and early childhood education.

The measure is likely to pass the House next week just before the House votes on impeaching Trump. A Senate vote is expected before a temporary spending bill expires next Friday at midnight.

A White House official said Trump is likely to sign the bill because it maintains his ability to pay for the wall. The official spoke on condition of anonymity because the deal is not official.

A year ago, a deadlock over the wall led Trump to spark a 35-day partial government shutdown. The eventual agreement that emerged produced a template for the current pact: no “poison pill” policy provisions on topics such as abortion and the environment that could not pass muster with both Democrats and Republicans.

See:The 2018-19 government shutdown was the longest on record — by a wide margin

“We decided that the decisions would be made today,” said Rep. Kay Granger, R-Texas. “We said, ‘It’s time to get this thing done.’”

At issue are 12 annual spending bill that fund the day-to-day operations of federal agencies. The appropriations package fills in the long-overdue details of this summer’s budget and debt pact, which offered boosts to both the Pentagon and domestic agencies instead of the sharp across-the-board spending cuts required under a now-defunct 2011 budget agreement.

Key factions supporting the sprawling package include GOP defense ITA, +2.05% hawks and Democrats, who won increases for domestic programs. The probable — and deeply unpopular — alternative would be to mostly run the government on autopilot and give back about $100 billion in spending increases from the July budget deal.

Trump’s top priority is to guarantee additional dollars for border fencing and other barriers. The deal bowed to a White House demand that Trump retain authority so he can transfer money from Department of Homeland Security and Pentagon accounts to border barrier construction. That promises to ease the sting of seeing his $8.6 billion border request cut way back.

Related:Here are the companies poised to profit from the Trump border wall

But Trump was denied $3.6 billion to replace money tapped from popular military base projects, an outcome that might make him reluctant to repeat his controversial move to declare an national emergency to grab the military money.

The drive for a spending agreement faced numerous hurdles, but it always had strong support from the top four leaders on Congress, especially House Speaker Nancy Pelosi, D-Calif., and top Senate Republican Mitch McConnell of Kentucky, two veterans of the appropriations process with a long history of assembling the votes for catchall spending bills. Their relationship has soured but they are a potent force when they team up.

The emerging measure is also likely to serve as the vehicle to carry into law several provisions unrelated to agency money; the spending bill is the last, best option to accomplish that.

They probably will include: a renewal of the Export-Import Bank’s charter; a reauthorization of government-backed terrorism risk insurance; a short-term extension of the federal flood insurance program; and further delays of Obama-era health law taxes such as those on medical devices and high-cost health plans.

A broader set of tax “extenders” popular with Washington’s business lobbying community appears stuck.

Related:Tax-credit expansion sought by Tesla, other EV players is among tax breaks getting lawmakers’ attention as year ends

Liberal Democrats and members of the Congressional Hispanic Caucus probably will be disappointed in the split-the-differences outcome. House Speaker Nancy Pelosi, D-Calif., met with the Hispanic lawmakers on Wednesday.

“Our top concern is that the president doesn’t misappropriate funds to fund a wall and continue to fund ICE and CBP,” said Rep. Debbie Mucarsel-Powell, D-Fla., referring to U.S. Immigration and Customs Enforcement and U.S. Customs and Border Protection.

It was obvious to negotiators, however, that essentially maintaining the status quo on border issues was the common denominator option, given the current balance of power in Washington. Democrats also noted that federal judges have sided with them in cases contesting Trump’s transfer powers.