BRUSSELS - Euro zone economic growth accelerated quarter-on-quarter in the second quarter, preliminary data showed on Friday, defying expectations of a slowdown, thanks to a much stronger than forecast performance in Spain, France and Italy.

The Eurostat preliminary estimate might be revised later, but it shows the resilience of the economy of the 19 countries sharing the euro amid record inflation, especially energy costs for industry, and uncertainty created by the Russian invasion of Ukraine.

Euro zone gross domestic product rose 0.7% quarter-on-quarter in the April-June period, estimates by the European Union's statistics office Eurostat showed and 4.0% year-on-year.

Economists polled by Reuters had expected a 0.2% quarterly rise and a 3.4% year-on-year gain, after a 0.5% quarterly increase and a 5.4% annual rise in the first three months.

Despite a slightly weaker than expected outcome in the euro zone biggest economy Germany, France beat expectations with a 0.5% quarterly growth, Italy with a much stronger 1.0% growth and Spain with an equally surprising 1.1% increase.

(Reporting by Jan Strupczewski)