WASHINGTON – Donald Trump promised during his campaign that if he won the White House, he would wipe out the national debt in just eight years.

But in his first 2½ years in office, he has gone in the opposite direction.

Trump Friday signed into law a budget bill hammered out with leaders of the Democratic-led House and the Republican-controlled Senate. It was a rare bipartisan agreement but some in the GOP were furious over the increase in spending.

The legislation will add an estimated $1.7 trillion to the national debt over the next decade, according to an analysis by the nonpartisan Committee for a Responsible Federal Budget.

That’s not all: When other bills that Trump has signed are factored in, Trump’s total contribution to the national debt is projected to top $4.1 trillion, the budget watchdog group said.

“Our national debt is a self-inflicted wound,” said Maya MacGuineas, the group’s president. “It will take the kind of leadership that currently doesn't exist in Washington to fix.”

A spokesman for the White House Office of Management and Budget defended Trump's fiscal record.

"Washington has a spending problem and President Trump has committed to using every tool at his disposal to help get our fiscal house back in order," spokesman Jacob Wood said. "This can be seen through the many actions he’s taken: balanced budgets, rescissions package, and even deregulation efforts.

"This administration will continue to find areas where we can cut federal spending to ensure we provide relief to future generations of Americans. We encourage Congress to do the same."

The national debt already has grown at a fast clip and surpassed $22 trillion for the first time in February, a milestone that experts say is further proof the country is on an unsustainable financial path. As of Friday, the debt stood at $22.55 trillion.

For Americans, the growing debt should be a concern, experts said, because over time it can push up interest rates for consumers and businesses. The higher rates can ripple through the economy, nudging up rates for mortgages, corporate bonds and other types of consumer and business loans.

Analysts warn the debt will climb even higher under the new budget deal, which provides a broad outline for $2.7 trillion in spending and raises the debt ceiling over the next two years. That amounts to a $320 billion increase over spending limits.

Under the agreement, negotiated by the White House and congressional Democrats, spending will jump by 21 percent during Trump’s first term, adding $1.7 trillion to the projected debt, the Committee for a Responsible Federal Budget said.

More: Debt and deficits are skyrocketing. How does it affect you?

Trump was elected in part because he promised to get the nation’s finances in order and eliminate the national debt. But Thursday, just a few hours before the Senate voted 67-28 to give final approval to the new budget agreement, Trump took to Twitter and praised the spending package.

“Budget Deal is phenomenal for our Great Military, our Vets, and Jobs, Jobs, Jobs!” he wrote. “Two year deal gets us past the Election. Go for it Republicans, there is always plenty of time to CUT!”

'Get rid of the fat':Why Uncle Sam's annual budget is a lot different from yours

The Heritage Foundation, a conservative think tank, said the budget deal will pile on $2 trillion in debt.

The agreement "fails to cut billions of dollars in waste, spends too much on programs that aren’t priorities, and effectively kills one of the few remaining mechanisms to curb unsustainable federal spending," said Kay Coles James, the group's president. "We can and should do better."

With Trump's signing of the spending bill, "we increase the pace of our march of fiscal irresponsibility," said Michael Peterson, chief executive officer of the Peter G. Peterson Foundation, a nonpartisan organization working to address the country’s long-term fiscal challenges.

"The last thing America needs is more debt as we face critical challenges from rising inequality to unaffordable healthcare to faltering infrastructure," Peterson said. "...The truth is that we can invest in our future and manage our debt at the same time. Lawmakers have no shortage of options to pay for their priorities and improve our fiscal sustainability, and the sooner we begin to face up to this challenge, the easier it will be.”

Other bills that Trump signed into law also will raise the national debt considerably in the coming decade, MacGuineas’ group warned.

Trump’s $1.5 trillion package of tax cuts approved in 2017 is projected to boost the debt by $1.8 trillion, according to the budget watchdog group’s analysis. But that number could easily climb higher if lawmakers extend the individual tax cuts that are set to expire after 2025. That would add another $1 trillion to the debt.

A separate budget bill negotiated last year by Senate Majority Leader Mitch McConnell, R-Ky., and Senate Minority Leader Chuck Schumer, D-N.Y. – and signed into law by Trump – would add $445 billion to the national debt.

Other legislation signed by Trump would boost the debt by another $155 billion, the budget watchdog’s analysis concluded.

MacGuineas slammed the government spending as “a shameful period of fiscal recklessness” and warned that it amounted to “generational theft.”

“Going forward, the choices are now going to get even tougher,” she said. “Future Congresses and presidents will have less room to enact big ideas. They will be tethered to cleaning up the past.”

What national debt? Budget deal shows neither GOP nor Democratic Party cares