WASHINGTON (AP) — U.S. wholesale inflation came in hot last month. Producer prices rose 6% from a year earlier, the highest point in more than three years, as the Iran war pushes up energy prices and intensifies pressure on companies to pass along their rising costs to consumers.

The Labor Department reported Wednesday that its producer price index — which tracks inflation before it hits consumers — shot up 1.4% in April, the biggest monthly gain in more than four years.

WATCH: Inflation could hit 4% next month and stay elevated for rest of year, economist warns

Energy prices climbed 7.8% from March to April and 22.7% from a year earlier. Gasoline soared 15.6% from March and diesel, the dominant fuel used in shipping, jumped 12.6%.

Gasoline prices, which have already become painful for many Americans, rose again overnight to a national average of $4.51 per gallon, according to motor club AAA.