WASHINGTON (Reuters) - President Donald Trump and U.S. congressional leaders reached a deal on Monday on a two-year extension of the debt limit and federal spending caps that would avert a feared government default later this year but add to rising budget deficits.

“I am pleased to announce that a deal has been struck with Senate Majority Leader Mitch McConnell, Senate Minority Leader Chuck Schumer, Speaker of the House Nancy Pelosi, and House Minority Leader Kevin McCarthy,” Trump said on Twitter.

Schumer and Pelosi promptly issued a statement confirming the agreement, saying the measure would be voted on “swiftly” in the Democratic-led House of Representatives. The Republican-led Senate must also pass the measure before it can be signed into law by Trump.

Pelosi has been pushing to win passage by this week, before the start of a long summer recess that extends to Sept. 9.

Final details between the Trump administration and congressional leaders were worked out as Pelosi talked by telephone from a delayed commercial flight to Washington following a speech she delivered earlier in the day in Detroit, a Pelosi aide said.

Under the agreement, which was the result of weeks of closed-door negotiations, the Treasury Department’s borrowing authority would be extended through July 31, 2021. Without legislation, Treasury could bump up against its borrowing limit before Sept. 9, according to some recent estimates, potentially triggering a default on some debt.

The pact would also set overall spending levels for the next two years on both defense and non-defense programs operated by the federal government.

Under the deal, spending on those “discretionary” programs would rise to $1.37 trillion in the fiscal year starting Oct. 1, up from $1.32 trillion this year, according to a congressional source.

In fiscal 2021, spending would rise at a slower pace, to $1.375 trillion.

Of the $1.37 trillion next year, military spending would reach a maximum of $738 billion, up from $716 billion this year. Non-defense appropriations would be capped at $632 billion in fiscal 2020, up from $605 billion this year.

McConnell, a Republican, praised the pact, saying it “secures the resources we need to keep rebuilding our armed forces,” while not specifically mentioning rising non-defense outlays.

A senior Democratic aide in Congress noted that if enacted into law, non-defense domestic funding would be $100 billion higher than when Trump took office in January 2017 - a figure likely to bring criticism from conservatives.

Earlier on Monday, a source close to the talks said the deal would include about $75 billion in what are being described as partial “offsets” to higher spending over the next two years.

FILE PHOTO: U.S. President Donald Trump speaks as he formally kicking off his re-election bid with a campaign rally in Orlando, Florida, U.S., June 18, 2019. REUTERS/Carlos Barria/File Photo

‘WORST’ BUDGET DEAL EVER?

Even before the agreement was announced, some outside experts were criticizing it.

Maya MacGuineas, president of the Committee for a Responsible Federal Budget, said it “may end up being the worst budget agreement in our nation’s history.”

If enacted into law, she said in a statement, Trump would have increased discretionary spending by as much as 22 percent over the course of his four-year term “and enshrined trillion-dollar deficits into law.”

Those deficits would accelerate a $22.4 trillion U.S. debt that was already growing in part as a result of tax cuts Trump and his fellow Republicans in Congress approved in 2017.

Even with an agreement enacted into law, Congress must pass spending bills to implement it. Lawmakers face a Sept. 30 deadline - the end of the current fiscal year - to pass those bills or temporarily extend current spending while new legislation is brokered.

Last December, Republican leaders thought they had a deal with Trump on legislation funding government activities for the current fiscal year. At the last minute, he demanded more money so he could build a wall along the U.S.-Mexico border to keep immigrants from entering the country illegally.

Democrats objected to border wall funding and the breakdown led to record-long, partial government shutdowns until Trump relented.

If the latest budget deal negotiated by the Trump administration and congressional leaders becomes law, it would mark the final chapter of a 10-year budget law enacted in 2011 that was designed to bring down federal spending through potentially steep across-the-board cuts.

But the reductions under the Budget Control Act of 2011 were regularly waived and U.S. deficits are now approaching $1 trillion a year.