An escalating trade war could wipe out the benefits of the Republican tax law passed last fall, President Trump's former top economic adviser said Thursday.

Gary Cohn, who served as Trump's director of the National Economic Council but left amid a rift over the president's trade policies, said that retaliatory tariffs between countries could drive up inflation and prompt American consumers to take on more debt, possibly pushing the country into another economic downturn.

“If you end up with a tariff battle, you will end up with price inflation, and you could end up with consumer debt,” Cohn, a former Goldman Sachs executive, said at a Washington Post event. “Those are all historic ingredients for an economic slowdown.”

Asked if the trade battle could erase the gains to the American economy from the tax law, Cohn said: “Yes, it could.”

Cohn announced his resignation from the White House in March during disagreements with Trump on trade, as the president planned to pivot toward protectionist trade policy. The administration has since imposed steel and aluminum tariffs on some of America's top trading partners, including close allies Mexico, the European Union and Canada. These countries have vowed to retaliate with tariffs on U.S. imports, sparking fears of a broader trade war and leading to a dramatic confrontation between world leaders at the Group of 7 summit earlier this month.

Economists are divided over the danger the tariffs pose to the broader economy, with some arguing that Trump would have to dramatically increase the number of tariffs to risk dragging down U.S. growth.

“If it really were to get out of control, then you could imagine it offsetting some of the tail winds currently affecting the economy,” said Satyam Panday, an senior economist at S&P Global. “But if we are talking about trade skirmishes, which is all we've seen so far, it's really not going to do much of anything meaningful.”

But others are worry that the tariffs could cost American businesses that would otherwise have more money to invest from the GOP tax law, in part by increasing the costs of “intermediate” goods purchased along the supply chain.

Higher tariffs on imports could raise domestic manufacturing costs because about half of all imports are then used to make additional products, said Dan Ikenson, a trade analyst at the Cato Institution, a think tank that generally favors lowering trade barriers. “Those higher costs will eat into manufacturers’ profits, and foreign tariff retaliation will eat into their revenues, squeezing profits from both ends. I think he's right to be worried,” Ikenson said, referring to Cohn. “It could come back and bite them in the ankles.”

The International Monetary Fund sounded a similarly fearful note on Thursday in an assessment of the U.S. economy, saying that “it would be serious” if the trade battles continues to escalate.

Cohn reiterated his disagreement with the administration's current approach on Thursday, arguing that America should not worry about its trade deficit with foreign countries. Trump has cited the trade deficit as a driving rationale behind his decision to impose tariffs.

“I have always said the trade deficit doesn't matter,” Cohn said. “In many respects, it's helpful for our economy.”

The White House declined to comment on Cohn's remarks, as did Senate Minority Leader Charles E. Schumer (D-N.Y.).

Cohn also appeared to criticize Trump's decision earlier this month to tweet about the government's monthly unemployment numbers before their official release, a move that broke with decades of tradition in which the federal government closely safeguards the market-moving data before its scheduled public release.

“Markets have very highly defined protocols. They have opening times, they have closing times, they have after-hours markets, they have certain times when certain events happen, and everyone knows when that happens,” Cohn said when asked about Trump's tweet about an hour ahead of the May jobs report. "I very much believe the integrity of the market has to be maintained, and nothing should violate the integrity of the market."

But Cohn touted the GOP tax law, arguing that it would take time for the cuts to spur higher wages for American workers.

Wages have barely kept pace with inflation, despite strong economic growth and low unemployment. Cohn predicted the dramatic cut to the corporate tax rate from 35 percent to 21 percent would translate into stronger business investment and, eventually, fatter paychecks for workers.

“The part of tax reform to me that was so important was really the corporate side,” Cohn said. “One thing that haunts me,” however, is that we were not able to make the individual income tax cuts permanent, he added, noting that much of the discussion of the law's income tax cuts is focused on when — eight years from now — those rates are set to go up.

Republicans have said a future Congress will extend those tax cuts, but Democrats have used the fact that the bill offers a permanent cut for corporations and, as of now, only a temporary one for individuals to hammer home their argument that its benefits to the wealthy outweigh those to the middle class.

Those earning more than $733,000 per year get an average $51,140 tax cut in the first year of the GOP tax law, compared with a $60 cut for those earning under $25,000 a year, according to the Tax Policy Center, a non-partisan think-tank. The richest 1 percent of Americans get 83 percent of the benefits of the law's benefits after the individual tax cuts expire, TPC said.

Cohn also acknowledged the tax law may drive up the federal deficit, in an apparent break with party orthodoxy. Pressed on whether he could promise the law would be revenue-neutral, Cohn said he could not.

“It may be revenue positive, it may be revenue negative,” Cohn said. “We don't know.”

The Congressional Budget Office, Congress's nonpartisan scorekeeper, said in April that the tax law will cost the United States $1.3 trillion over the next 10 years, and more if you include the interest the government pays on new debt.