WASHINGTON (AP) — U.S. inflation cooled last month as the cost of gas, clothes, and used cars fell, providing some relief to consumers, while underlying price pressures also slowed more than expected.

Consumer prices dropped 0.4% from May to June, the largest monthly drop in four years, the Labor Department said Tuesday, after rising 0.5% in the previous month. On a yearly basis, inflation declined to 3.5%, down from a year-over-year gain of 4.2% in May and lower than many economists expected.

Excluding the food and energy categories, core prices were unchanged from May to June, a positive sign that underlying inflation is declining. On a yearly basis, core prices rose just 2.6%, down from 2.9% the previous month. Core inflation remains above the Federal Reserve’s target of 2%.

The core figures suggest that the gas price spike from the Iran war, while it pushed up airfares and some other costs, hasn’t so far led to broad-based, sustained inflation, economists said.

“This reading is very much in the camp that the inflation we’ve had this year is transitory,” said Michael Metcalfe, head of macro strategy at State Street Markets. “Yes, gas prices went up, but nothing else did, more or less.”

Yet oil prices rose for a second day Tuesday as the United States renewed attacks on Iran and President Donald Trump announced a new blockade in the Strait of Hormuz, a key shipping route for about one-fifth of the world’s oil. The increase threatens to undo at least some of the progress that occurred last month.

And many Americans have soured on the economy after five years of elevated inflation, posing a risk to Trump and Republicans in the upcoming midterm elections.

For his part, Trump on Tuesday blamed his predecessor, Democrat Joe Biden, for the rate of inflation having spiked to athree-year high just last month.

“It’s not my fault,” he said. “We are putting it to sleep. … Inflation is way down.”

“Remember that for the midterms,” he added.

Yet inflation has risen since Trump’s inauguration last year, to 3.5% from 3% in January 2025. It jumped even further after the Iran war began Feb. 28, when it was just 2.4%

Benign report could make Fed rate hike less likely

Tuesday’s report likely reduces pressure on the Fed to boost its short-term interest rate to combat inflation. Last month, Fed officials left their key rate unchanged at about 3.6%.

“Today’s report gave some breathing room for the Federal Reserve in deciding whether and when to raise interest rates,” Kathy Bostjancic, chief economist at Nationwide Financial, said.

Fed Chair Kevin Warsh, in written testimony to the House Financial Services Committee, said Tuesday that the Fed has “no tolerance” for high inflation which he pledged would become “a thing of the past.” Yet he provided no hints about what steps the Fed may take in coming months. Warsh will face questions later Tuesday from members of Congress.

More goods and services saw slower price gains than expected

A wider range of prices cooled last month than economists had forecast. Electricity prices, which have been elevated by spiking demand from data centers, fell 1% from May to June, though they are still 4% higher than a year ago. Clothing prices dropped 0.6% from May to June but are 3.9% more expensive than a year earlier.

Groceries rose 0.2% from May to June and are up 2.7% from last year, while apartment rental costs cooled, rising just 0.1% last month and 2.8% from a year ago.

The inflation-fighters at the Fed remain sharply divided over next steps, according to minutes of their June 16-17 meeting. About half of policymakers support raising interest rates by the end of the year to cool borrowing, spending, and price increases, the minutes showed. Another half are willing to wait for signs that inflation may resume falling as gas prices decline, though the minutes predate the recent flare-up of violence in the Middle East.

And the situation in the Middle East continues to change hour to hour. On Tuesday, the price for a barrel of Brent crude oil, the international standard, climbed 4.6% to $87.13 after the United States and Iran each said the Strait of Hormuz is under its control. Gas prices have also risen about 6 cents a gallon in the past week, to a nationwide average of $3.86 a gallon.

“Today’s number is a very good reading, but so much is going to depend on what happens in the Middle East,” Bostjancic said.

Next steps

Many Fed officials have flagged massive investments in the build out of artificial intelligence infrastructure as a factor that could worsen inflation by pushing up prices for memory chips and other semiconductors, as well as electricity. With chips so much more expensive, companies like Apple, Microsoft, and Dell have announced price increases for laptops, tablets, and video game consoles.

Other Fed officials have offered conflicting views on what steps the Fed could take next. On Monday, Fed governor Christopher Waller said he was worried about core inflation, which he noted had risen from 3% last December to 3.4% in May, according to the Fed’s preferred measure. He pointed out that the cost of more than two-thirds of services have risen by 3% or more compared with a year ago.

“If we get another hot reading on core inflation this week, then the (Fed) will need to consider tightening monetary policy in the near term,” Waller said in a speech in New York.

But last week John Williams, president of the Federal Reserve Bank of New York, said that if core inflation stays at a 0.2% monthly pace for the rest of this year, the Fed could avoid hiking rates. Tuesday’s data is along the lines of what Williams wants to see.

Other signs of where prices are headed are mixed. The Federal Reserve Bank of New York said last week that a survey found that nearly half the companies in its region that have paid tariffs still plan to lift their prices further.

Separately, Walmart last week said it was rolling back prices on thousands of items, including ground beef, potato chips, toys, and clothes. Trump praised the move on social media and sought to take credit for the reduction, though the company did not mention Trump in its announcement.