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

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

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

The tentative agreement sets the stage for a remarkable sequence of events next week in the House, with a presidential impeachment vote 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.

President Trump has not yet sent a clear signal of support, though congressional leaders said they have been encouraged by Mnuchin’s eager participation. Trump, however, initially rejected a tentative 2019 spending deal negotiated on Capitol Hill a year ago, plunging the federal government into a record 35-day partial shutdown.

While key sticking points have been settled, aides from both parties said negotiators would continue to resolve a number of minor issues before releasing the text of the agreement in coming days.

Lowey and Shelby declined to discuss details of the deal Thursday afternoon, but a key final obstacle was Trump’s border wall — the very issue that sparked last year’s record shutdown.

While Trump loyalists pushed for expansive funding and liberals pushed to eliminate it entirely, negotiators proceeded under a mutual understanding that the border issues would have to be resolved somewhere close to the status quo.

According to two officials familiar with the deal, 2020 wall funding would remain unchanged from 2019 levels at $1.375 billion. The Trump administration would retain the ability to transfer funds from other accounts, but Congress would not replenish the accounts it drew from earlier this year. Funding for the immigration enforcement agencies also would remain unchanged from 2019 levels. The officials spoke on the condition of anonymity to discuss private deliberations.

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, but it could halt wall construction in the short term, tilting the status quo in favor of Democrats.

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.

Rep. Alexandria Ocasio-Cortez (D-N.Y.) called wall funding “a sure red-line issue” for the group’s 34 voting members. “It’s just simply unacceptable for the Hispanic Caucus to cast any vote for any wall funding,” she said. “That’s very important for us.”

Members of the caucus also pushed for a strict cap on Immigration and Customs Enforcement detention beds and new humanitarian standards for migrants detained at the southern border.

But, under a bipartisan deal, it could be impossible for a small group of lawmakers to force major concessions. In the past two years, Congress has provided over $1 billion in wall funding over liberal objections, and Trump’s moves to shift funding from other programs have generated a raft of litigation that is working its way through the federal courts.

“I’m not sure that you’re going to get 100 percent of the caucus to support any appropriations bill,” Lowey said Wednesday after leaving the meeting with the Hispanic Caucus. “There will be things they like, things they don’t like. . . . Not everyone can vote for the bills, and we just need enough votes to pass.”

The new deal fills in the details of agency-by-agency, account-by-account funding pursuant to a broader two-year, $2.7 trillion budget deal that Trump and Democrats agreed to this summer. That agreement set top-line levels of military and domestic spending, paving the way for Thursday’s more fine-grained agreement.

Mnuchin left a midday meeting with Pelosi declaring that the deal was within reach, noting that a list of hundreds of conflicts had been narrowed to a “handful” of issues and that he planned to brief Trump before finalizing a deal.

“We’ll see if we can resolve this quickly,” he said.