Inflation stayed steady in July amid rising energy costs but remained far below the Bank of Japan's elusive target rate of 2 percent, government data showed Friday.

Japan's core consumer price index, which excludes the volatile prices of fresh food but not energy, rose 0.8 percent from a year earlier, maintaining the same pace as in June.

Including fresh food, a surge in vegetable and seafood prices lifted consumer prices 0.9 percent, compared with 0.7 percent in June.