German inflation picked up pace in July, provisional data showed Thursday, as energy price growth accelerated.

Overall inflation came in at 2.8 percent in July, statistics office Destatis said, up from 2.3 percent in June.

Excluding volatile food and energy costs, price growth came in at just 2.4 percent.

But energy prices were up 8.3 percent – a faster rate of growth than in May or June.

Energy costs have been volatile amid the collapse of a fragile ceasefire in the Middle East war, with Iran declaring the Strait of Hormuz -- a waterway that normally carries about a fifth of the world's oil and natural gas -- closed.