(Updates with Trump and Democrats announcing deal)
WASHINGTON, July 22 (Reuters) - President Donald Trump and U.S. congressional leaders said on Monday they reached a deal on a two-year extension of the debt limit and federal spending caps through Sept. 30, 2021.
"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 House of Representatives. The Senate must also pass the measure before it can be signed into law by Trump.
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.
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 these "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.
Earlier on Monday, a source close to the talks said the deal would include about $75 billion in what is being described as partial "offsets" to higher spending over the next two years.
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 already was growing in part as a result of tax cuts Trump and his fellow Republicans in Congress approved in 2017.
Without legislation, Treasury could bump up against its borrowing limit before Sept. 9, according to some recent estimates.
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. (Reporting by Richard Cowan; editing by David Gregorio and Steve Orlofsky)