WASHINGTON — Top congressional negotiators said Thursday they had reached a deal in principle to approve $1.3 trillion in federal spending for 2020, likely averting a government shutdown next week.

The announcement, from House Appropriations Committee Chairman Nita Lowey, D-N.Y., and Senate Appropriations Committee Chairman Richard Shelby, R-Ala., came after Treasury Secretary Steven Mnuchin visited Capitol Hill midday to review a final list of sticking points.

At issue are 12 annual spending bills that fund the day-to-day operations of federal agencies. The appropriations package fills in the long-overdue details of last 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.

The tentative agreement sets the stage for a remarkable sequence of events next week in the House, with a presidential impeachment sandwiched between bipartisan deals on federal spending and North American trade. The House could vote on the spending bill as soon as Tuesday, with the Senate acting before the end of the week.

While key sticking points have been resolved, aides from both parties said negotiations would continue to resolve a number of minor issues before releasing the text of the agreement.

Lowey and Shelby declined to discuss details of the deal Thursday afternoon, but a key final obstacle was President Donald Trump’s border wall — the very issue that sparked a record-long 35-day government shutdown a year ago.

While Trump loyalists pushed for firm funding and liberals pushed to eliminate it entirely, it was obvious to negotiators that essentially maintaining the status quo on border issues was the common denominator option, given the current balance of power in Washington. The same held for several Democratic-drafted provisions related to abortion that were also dropped.

The deal does bow 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.

A ruling from a federal judge in Texas late Tuesday presented a new wrinkle — placing an immediate nationwide injunction blocking Trump from using military construction accounts to fund the wall. The Trump administration said it would appeal the ruling.

Members of the Congressional Hispanic Caucus met with House Speaker Nancy Pelosi, D-Calif., on Wednesday to reiterate their opposition to giving Trump any opening to proceed with border barrier construction — whether through direct appropriations or through the transfer of funds from other agencies and projects.

“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.

Top officials left a midday meeting with Pelosi declaring that the deal was within reach. Mnuchin said a list of hundreds of conflicts had been narrowed to a “handful” of issues.

The emerging measure is also likely to serve as the vehicle to carry into law several provisions unrelated to agency money.

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.

Associated Press contributed.