Japan's wholesale prices rose 3.1 percent in July from a year earlier, reflecting higher energy costs as well as the effect of a heat wave and torrential rain that cut the supply of farm products, the Bank of Japan said Friday.

The prices of goods traded between companies picked up for the 19th straight month, potentially leading to higher consumer prices. The central bank is struggling to lift inflation to its target of 2 percent.

Producer prices for oil and coal products spiked 26.6 percent, while utility costs gained 3.8 percent.

Those for agriculture, forestry and fishery products, including pork, dried whitebait and eggs, climbed 4.3 percent due to tight supply following a long-running heat wave and downpours that caused flooding and landslides in wide areas of western Japan.

Import prices soared 11.5 percent while export prices increased 2.8 percent from a year earlier, both in yen terms.