U.S. wholesale prices were unchanged in July after two months of large increases, a sign inflation pressures have softened.

Gas prices and other energy costs fell after two months of strong gains, and food costs also declined.

The Labor Department said Thursday that the producer price index — which measures price changes before they reach the consumer — increased 3.3 percent last month from a year earlier. That’s down slightly from 3.4 percent in June, which was the biggest in six years.

Gas prices and other energy costs fell after two months of strong gains, and food costs also declined. The price of soybeans and other oilseeds fell 14 percent, the most in four years, likely reflecting a buildup in soybean stocks after China imposed tariffs on them in retaliation for U.S. duties.

With the economy growing at a healthy clip, inflation has perked up after nearly a decade of mostly tame prices. Higher gas prices have been the main catalyst, but they have leveled off in recent weeks. The average price nationwide for a gallon of gas was $2.87 Thursday, according to AAA. That’s the same as a month earlier.

Still, the Trump administration’s trade fights with major trading partners, including the European Union, Canada and Mexico as well as China, could lift prices further if more duties are imposed.

The consumer price index increased 2.9 percent in June from a year earlier, also the largest in six years.

The Federal Reserve’s preferred inflation gauge has risen at a more muted pace, increasing 2.2 percent in the past year. The Fed targets 2 percent inflation to protect against deflation, a destabilizing trend that leads to lower prices and incomes. Price increases were below 2 percent for six years, according to the Fed’s gauge.

The Fed is raising the short-term interest rate it controls in an effort to keep inflation in check. Fed policymakers have increased the rate five times in the past three years, to between 1.75 percent and 2 percent. They have indicated they will hike twice more this year.

A drop in wholesale service prices, including airline fares and hospital care, offset a slight increase in wholesale goods costs to leave producer prices unchanged in July. That followed gains of 0.3 percent in June and 0.5 percent in May.

Still, goods prices rose 4.5 percent in July from a year earlier, the strongest gain in six and a half years, led by higher costs for new cars and pharmaceuticals. Services costs have increased 2.6 percent in the past year.

© The Associated Press. All rights reserved.