The United States is putting its own economy at risk with aggressive trade tactics and a ballooning deficit, the International Monetary Fund says.

In an annual checkup for the US economy, the IMF warned that the short-term economic boost from last year's $1.5 billion tax cut and $300 billion federal spending bill probably won't last.

In the meantime, stimulating the economy when it's already strong could "elevate risk to the US and global economy," the IMF cautioned.

Specifically, expanding the federal deficit at this stage in the economic cycle could trigger a "faster-than-expected rise in inflation," Christine Lagarde, the IMF managing director, told reporters.

That would probably push the Federal Reserve to raise interest rates faster to keep the economy from running too hot, she added.

Related: Fed raises interest rates and signals faster hikes on the way

On Wednesday, the Fed raised rates for the second time this year, and it signaled it may accelerate its rate hikes with two more this year instead of one.

The Fed made note of rising inflation in its latest economic forecast. But Fed Chairman Jerome Powell noted inflation would likely "bounce around" over time, especially with a spike in global oil prices likely to raise prices.

Earlier this week, Lagarde warned that the clouds over the world economy are "getting darker by the day" amid escalating trade tensions.

On Thursday, she called out the Trump administration's tariffs for adding risk to the US and world economies. The administration has enacted or threatened tariffs on tens of billions of dollars' worth of imports, both from China and from US allies.

"It would be serious, not only if the United States took action, but especially if other countries were to retaliate, notably those who would be most affected, such as Canada, Europe, and Germany, in particular," Lagarde warned.

Her comments followed the acrimonious end to the G7 summit in Quebec last weekend, after which President Donald Trump attacked Canadian Prime Minister Justin Trudeau over trade.

The IMF forecast that US economic growth will slow after this year, as the impact of the tax cuts fades, and will ease to a 1.4% pace by 2023. That is much slower than the White House projection, which calls for sustained economic growth of 3% within five years.

The fund's outlook was also more pessimistic than the Fed's. The central bank on Wednesday called for 1.8% economic growth in the long run.

Lagarde said Treasury Secretary Steven Mnuchin made "very clear" to her that he regards the IMF forecast as pessimistic.

"Frankly, I hope he is right," she said. "That would be good for both the US and the world economy."

In a statement, the Treasury Department said it shared the IMF's rosier near-term forecast for US economic growth, but "we differ significantly on the medium and long term projections."

"The Treasury Department believes that our policies, including productivity-boosting mix of tax reform and regulatory relief, will result in more sustainable economic growth," the statement said.

Related: IMF chief: Clouds over global economy are 'getting darker by the day'

The IMF director strongly encouraged the United States to take steps "starting now" to reduce its fiscal deficit.

"With the economy doing so well, what better time to do it?" she said.

She also recommended US policy makers work to help poor working families by expanding eligibility for the earned income tax credit. That would to help lower-income Americans grow their paychecks to support their families, she said.