The Spanish economy, the eurozone's fourth-largest, grew by 1.2 percent over 12 months, following four consecutive quarters of expansion, the statistics office said in a statement.
The second quarter growth figures were in line with preliminary figures for the period released by the institute on July 30.
The quarterly growth figures marked an acceleration from growth of 0.4 percent in the first quarter.
It is Spain's best quarterly growth figure since the final three-month period of 2007, when the economy grew by 0.7 percent.
Spain fell into the first of two severe recessions in the second half of 2008 after its real estate sector collapsed. It emerged from the second slump in late 2013.