WASHINGTON (AP) — Inflation rose last month as consumer prices increased 2.7 percent in June from a year earlier, according to a new report from the Labor Department. That figure is up from an annual increase of 2.4 percent in May.

On a monthly basis, prices climbed 0.3 percent from May to June, after rising 0.1 percent the previous month.

Excluding the volatile food and energy categories, core inflation increased 2.9 percent in June from a year earlier, up from 2.8 percent in May. On a monthly basis, it picked up 0.2 percent from May to June. Economists closely watch core prices because they typically provide a better sense of where inflation is headed.

The uptick in inflation was driven by a range of higher prices. The cost of gasoline rose 1 percent from May to June, while grocery prices increased 0.3 percent.

Appliance prices jumped for the third straight month. Toys, clothes, audio equipment, shoes and sporting goods all became more expensive.

Some analysts say President Donald Trump’s increased tariffs on most other countries is starting to impact the nation’s economy.

“You are starting to see scattered bits of the tariff inflation regime filter in,” said Eric Winograd, chief economist at asset management firm AllianceBernstein, who added that the cost of long-lasting goods rose last month, compared with a year ago, for the first time in about three years.

Winograd also noted that housing costs, one of the biggest drivers of inflation since the pandemic, has continued to cool, which is holding down broader inflation.

The cost of rent rose 3.8 percent in June compared with a year ago, the smallest yearly increase since late 2021.

“Were it not for the tariff uncertainty, the Fed would already be cutting rates,” Winograd said. “The question is whether there is more to come, and the Fed clearly thinks there is,” along with most economists.

Trump has imposed sweeping duties of 10 percent on all imports, plus 50 percent levies on steel and aluminum, 30 percent on goods from China and 25 percent on imported cars.

Last week the president threatened to hit the European Union with a new 30 percent tariff starting Aug. 1.

He has also threatened to slap 50 percent duties on Brazil, which would push up the cost of orange juice and coffee. Orange prices leaped 3.5 percent just from May to June and are 3.4 percent higher than a year ago.

Overall, grocery prices rose 0.3 percent last month and are up 2.4 percent from a year earlier. While that is a much smaller annual increase than before the pandemic, it is slightly bigger than the pre-pandemic pace of food price increases.

The Trump administration has also placed a 17 percent duty on Mexican tomatoes.

The acceleration in inflation could provide a respite of sorts for Fed Chair Powell, who has come under fire from the White House for not cutting the benchmark interest rate.

The Fed chair has said that the duties could both push up prices and slow the economy, a tricky combination for the central bank since higher costs would typically lead the Fed to hike rates while a weaker economy often spurs it to reduce them.

Trump earlier this week said that Powell has been “terrible” and “doesn’t know what the hell he’s doing.” The president added that the economy was doing well despite Powell’s refusal to reduce rates, but it would be “nice” if there were rate cuts “because people would be able to buy housing a lot easier.”

Last week, White House officials also attacked Powell for cost overruns on the years-long renovation of two Fed buildings, which are now slated to cost $2.5 billion, roughly one-third more than originally budgeted.

Some companies have said they have or plan to raise prices as a result of the tariffs, including Walmart, the world’s largest retailer.

Automaker Mitsubishi said last month that it was lifting prices by an average of 2.1 percent in response to the duties and Nike has said it would implement “surgical” price hikes to offset tariff costs.

Many companies, however, have been able to postpone or avoid price increases, after building up their stockpiles of goods this spring to get ahead of the duties.

Other companies may have refrained from lifting prices while they wait to see whether the United States is able to reach trade deals with other countries that lower the duties.