Wholesale prices rose 2.7 percent in May, the fastest pace since January, as energy costs climbed, the Bank of Japan said Tuesday.

The prices of goods traded between companies had been trending downward since late last year, and the rebound could push up consumer prices all the way down the line. That would be a welcome outcome for the central bank, which is trying to stoke 2 percent inflation to spark economic activity.

Wholesale prices gained for the 17th consecutive month, picking up from a revised 2.1 percent rise the previous two months.

Among the items behind the rises, oil and coal products surged 19.4 percent and utilities rose 4.8 percent. Plastic products, which are produced using oil, rose 0.8 percent.

Metals also helped push up the whole, with nonferrous metals such as aluminum and copper rising 9.3 percent and steel climbing 4.4 percent amid solid demand for building projects ahead of the 2020 Tokyo Olympics.

Export prices rose 2.4 percent and import prices rose 6.5 percent, both in yen terms.

The BOJ is pursuing a 2 percent inflation target to ward off growth-stunting deflation, but five years of aggressive monetary easing has done little to raise prices.

Core prices, excluding volatile fresh food prices, rose a weak 0.7 percent in April from a year earlier as companies remain hesitant to hike the prices of products and services for fear of chasing away frugal customers.