The growth figure, a first estimate from the National Statistics Institute (INE), suggests the country's economy has finally grown back to the size it was before the credit crunch of 2008.
Spain was bailed out in 2012 by the EU at the height of Europe's debt crisis.
Its figures were among the strongest of a batch of European economic data released on Friday.
France's economy grew by 0.5% in the second quarter of the year, the same rate as in the previous three months, helped by higher exports, notably the sale of a 700m euro (£626m) ocean liner, the Meraviglia.
Confidence levels in France were boosted by the recent election of President Emmanuel Macron, although that has abated somewhat since.
Nonetheless, the country is on track to meet forecasts for growth of 1.6% this year.
Meanwhile a preliminary estimate from Sweden's statistics office suggested the country's economy grew by a faster-than-expected rate of 1.7% in the April-to-June period.