By Sherry Qin

Taiwan's inflation remained elevated for a second straight month in June, despite easing Middle East tensions and lower oil prices.

The consumer-price index climbed 2.6% from a year earlier last month, government data showed Tuesday. That was above the 2.25% increase expected in a Wall Street Journal poll of economists, and higher than the 2.2% rise in May.

On a month-to-month basis, consumer prices gained 0.52% in June, the statistics bureau said, citing higher summer electricity rates.

After the U.S. and Iran reached an interim peace agreement, oil prices have fallen quickly, and Taiwan's energy supply conditions could gradually stabilize after the reopening of the Strait of Hormuz--a critical shipping route through which roughly one-fifth of the world's oil typically passes.

However, cost pass-through from upstream producers to downstream manufacturers and retailers is expected to persist, reflecting the cumulative increase in energy, shipping and raw material costs over the past months, DBS economists said in a note ahead of the latest inflation data.

The island's inflation print in the next few months will be critical for the Taiwan central bank's next monetary policy decision, as it has turned slightly hawkish over the past two meetings. Several banks, including ANZ and DBS, expect the central bank to raise rates in September.

Write to Sherry Qin at sherry.qin@wsj.com