Eurozone inflation rose to 3.3% August, the highest level seen in three years, as the war in the Middle East kept pressure on energy costs, official data showed Tuesday.

Well above the 2% target set by the European Central Bank (ECB), the figure from the EU's statistical office was up sharply from 2.9% in July and in line with forecasts by analysts for Bloomberg.

"Looking at the main components of euro area inflation, energy is expected to have the highest annual rate in August," Eurostat said, noting that energy prices were up 14.3% in August after rising 10.3% in July.

The U.S. war against Iran and the near-total closure of the Strait of Hormuz, a key energy trade route, have sent global energy costs soaring.

"Inflation should remain well above target into next year, as higher gas and food prices put additional upward pressure on the index," said Leo Barincou of Oxford Economics.