WASHINGTON ― House Speaker Nancy Pelosi and Treasury Secretary Steven Mnuchin have reached a “near-final agreement” on a two-year budget deal that has increases for defense and domestic top lines.

If the deal holds, it could prevent another partial government shutdown this fall and provide budget stability that defense leaders have been begging lawmakers for in recent years.

The agreement would also “permanently end” budget caps already set to expire in 2021 ― long a priority for lawmakers on both sides of the aisle ― and suspend the debt limit until July 31, 2021, according to a source close to the talks. That would mark a retreat for the White House, which reportedly sought to extend the caps another two years.

President Donald Trump was upbeat Monday about the status of budget talks, saying, “We’re having very good talks," with Pelosi and other congressional leaders.

“Very important that we take care of our military. Our military was depleted and in the last two and a half years, we’ve un-depleted it, to put it mildly,” Trump said. “We have made it stronger than ever before. We need another big year.”

Top lines for defense and nonmilitary spending were not immediately disclosed. Senate Republicans have already advanced legislation backing $750 billion in defense spending for fiscal 2020 (a figure supported by the White House to maintain military readiness) while House Democrats have moved a slimmer, $733 billion military funding plan.

Previous budget deals modified budget caps for equal increases in defense and nondefense accounts, and the source said the near-final deal includes “parity.” It’s unclear whether in this case that means a percentage or dollar increase and what the starting point would be for that increase.

Mnuchin and Pelosi are “down to some technical language issues,” and the former ― who has emerged as the White House’s lead negotiator on the budget impasse ― “has been keeping the president and congressional Republicans updated regularly” on the progress of the negotiations, the source said.

The administration backed off its reported priority of $150 billion in spending cuts, as negotiators settled on $75 billion in offsets instead. The near-final agreement contains items from the same bipartisan offset package from the last bipartisan caps agreement, the source said.

Still, past budget deals have advanced in Congress only to be upended at the last moment by President Donald Trump, who has proclaimed in the past that nonmilitary spending must be trimmed to rein in wasteful government spending. Trump has not yet publicly commented on this proposal.

Republicans in both the House and Senate have argued the fiscal 2020 defense budget should not go below that $750 billion mark, citing congressional testimony from defense officials that 3 to 5 percent year-over-year budget growth is needed.

The amount reflects focus on great power competition, as called for in the 2018 National Defense Strategy. The last two budgets were more focused on replenishing depleted munitions stocks and addressing readiness concerns that were the result of statutory budget caps.

Trump’s nominee for defense secretary, Army Secretary Mark Esper, cited the long-term risk from China in testimony last week in support of both the president’s budget request and the need for a two-year budget deal.

“I cannot overstate how important it was for [the Department of Defense] last year to receive the budget on time,” Esper said. “It really allowed us to accelerate the readiness gains we made, to advance our modernization efforts, and do all those things that the National Defense Strategy tells us to do.”

The retreat from the possibility of a one-year continuing resolution, which lawmakers and the administration had openly discussed, is a win for the Pentagon. While short-term stopgap CRs are nothing new, CRs do lock in spending at the previous year’s level and bar new programs from starting as well as production increases.

A “clean” CR would have provided $716 billion. However, since the budget cap for defense is $576 billion for 2020, the CR would have violated statutory budget caps by approximately $71 billion and triggered a sequester of that amount in January 2020.

The White House and congressional negotiators are racing against the clock to reach a budget deal to ease statutory spending caps and avoid a government shutdown that would start Oct. 1.

With the House taking a recess at the end of the week, Pelosi has only days to muscle through any potential deal, while the Senate has another week before its summer recess begins.