Jeff Gundlach, the legendary investor who predicted the subprime loan crisis, fears that Washington is spending its way to a "suicide mission."

Gundlach, the so-called king of the bond market, warned on Tuesday that the "federal debt is exploding."

Surging federal deficits are particularly alarming because borrowing costs are climbing, making it more expensive to pay interest on America's mountain of debt. The Federal Reserve bumped up interest rates on Wednesday, its seventh hike since late 2015.

"We are doing something that almost seems like a suicide mission: We're increasing the federal deficit while raising interest rates," Gundlach, the CEO of DoubleLine Capital, said during a webcast.

"That could lead to a real fiscal solvency problem, eventually," said Gundlach, who famously warned in June 2007 the subprime debacle was about to get much worse.

Even though the US economy looks healthy, Washington is spending wildly to accelerate growth.

President Donald Trump and Republicans enacted tax cuts for businesses and households late last year. Including interest costs and faster growth, the nonpartisan Congressional Budget Office estimates the tax law will add $1.9 trillion to America's debt through 2027.

Congress also reached a bipartisan agreement this year to lift spending caps, unleashing a flood of federal dollars.

The United States racked up a monthly deficit of $147 billion in May -- the largest for the month of May since 2009, during the financial crisis, according to the Treasury Department.

Treasury now projects an annual deficit of nearly $833 billion for the full fiscal year, which ends September 30. That's 25% higher than it was in 2017.

Related: Ben Bernanke warns this is the Wile E. Coyote economy

Washington's tax cuts and spending have left some economists perplexed. The federal government normally tries to stimulate growth near recessions, not during the tenth year of an economic expansion. The recovery from the Great Recession is now the second longest in history.

The United States is on track to book a trillion-dollar annual deficit starting in 2020, according to the CBO. That's two years sooner than what the agency was projecting just a year ago. Trillion-dollar deficits will make it harder for Congress to fight the next recession by borrowing more.

"This is pretty much unprecedented that we're seeing this level of debt expansion so late in the economic cycle," Gundlach said.

He complained that the explosion of debt doesn't even address America's aging infrastructure.

Ben Bernanke, the former Federal Reserve chief, echoed concerned last week about economic policy.

"What you're getting is stimulus at the very wrong moment," he said at an American Enterprise Institute event.

Bernanke fears the economy will fade once the sugar rush from tax cuts goes away, creating a "Wile E. Coyote" situation.

Related: Trillion-dollar deficits will make next recession more painful

For now, Wall Street doesn't seem fazed by America's debt burden.

The stock market boomed last year as Trump promised massive business tax cuts that are now juicing corporate profits.

Federal borrowing costs have increased, but they aren't high by historical standards. The 10-year Treasury rate climbed above 3.1% last month for the first time in nearly seven years. But Treasury yields have since retreated and they're well shy of pre-crisis levels.

Still, rates could keep climbing as the Federal Reserve taps the brakes on the economy and responds to signs of warming inflation. New inflation numbers released on Wednesday show that producer prices climbed in May at the fastest pace since 2011.

Given the debt situation, Gundlach warned the Fed not to rush to hike rates.

"We better not push interest rates much higher," he said.

--CNNMoney's Jeanne Sahadi contributed to this report