Wholesale prices rose 4.3 percent in July from a year earlier largely due to higher energy costs and price increases for some food items, the Bank of Japan said Tuesday.

The result was almost in line with market forecasts. Corporate goods prices rose for the 16th straight month, with the index standing at 106.6 against the 2010 base of 100, the BOJ said in a preliminary report.

Prices have been affected by the April 1 consumption tax hike from 5 percent to 8 percent. Without its direct effect, the index rose 1.5 percent to 103.7.

The prices grew 0.3 percent from June as utilities increased electricity charges as usual in response to rising demand amid summer heat.

Petroleum and coal products prices gained 11.9 percent from a year before as higher crude oil prices led to price rises for gasoline and light oil.

Prices of food, beverage, tobacco and animal feedstuffs grew 3 percent. Rising raw materials costs affected products such as ham, cheese, sushi and boxed lunches, the BOJ said.

Nonferrous metals and chemical products added to the upward momentum in wholesale prices.

Some weakness can be seen in the housing sector, though, with a BOJ official noting that prices for some construction materials remained subdued amid falling demand that followed a sharp increase ahead of the tax hike.

Wholesale prices followed a path of "moderate increase," the official told a press briefing, but declined to comment on whether the trend will continue, saying there were both upward and downward developments regarding the data.

Import prices rose 2.8 percent in yen terms on higher prices for oil, coal and natural gas. Export prices in yen terms increased 0.7 percent, largely affected by chemical products and vehicles.