In the first quarter, growth had fallen by 5.2 percent, the Institute of National Statistics said (INE). A recession is commonly defined as two consecutive quarters of a contraction in GDP.
The first of estimate by INE is broadly in line with the forecast by the Bank of Spain which had seen a contraction in the economy of between 16 and 22 percent for the period between April to June at the height of the lockdown when all non-essential activities were halted.
The restrictions imposed under the state of emergency, which began in mid-March, were only gradually lifted in May and June.
The business, transport and hotels sector were all badly hit, with a 40 percent drop compared with the first quarter.
And tourism, a pillar of the Spanish economy which accounts for 12 percent of GDP, suffered with a 60 percent drop in revenues compared the same period in 2019.
Construction fell by 24 percent compared with the first quarter and industry by 18.5 percent. Household consumption dropped by around 21 percent and business investment by 22 percent while exports fell by around a third.
The Spanish government sees the economy contracting by 9.2 percent overall in 2020 but the Bank of Spain says that figure could reach 15 percent.
Recovery 'years away'
Analysts at Capital Economics said they were expecting the Spanish economy to contract “by some 12% this year and then recover only slowly thereafter, with a return to pre-virus size years away”.
“The record plunge in Spain's GDP of 18.5 percent is likely to have been one of the biggest falls of any euro-zone country in the second quarter, illustrating the severity of the country's lockdown and its slow and partial recovery,” it said in a note.
“And the recent rise in virus cases is likely to hold back the recovery in tourism, strengthening our view that the Spanish economy will struggle to rebound as quickly as its neighbours.”
Spain suffered a particularly deadly outbreak of the virus, with more than 28,400 people losing their lives.
However, it will benefit considerably from the historic €750-billion rescue plan that was agreed by the European Union's 27 member states on July 21.
Under the plan, Spain will receive €140 billion ($162 billion) of which just over half — or 73 billion — is in the form of subsidies, while the rest is in the form of loans.
According to Economy Minister Nadia Calvino, the measures taken by the government to prop up the economy — such as extending its furlough scheme, state-sponsored loans, subsidies for the self-employed — enabled Spain to avoid “a collapse in GDP of more than 25 percent”.
The pandemic also destroyed more than a million jobs in Spain in the second quarter, mostly in the services and tourism sector.
Unemployment hit 15.3 percent by the end of June and is expected to reach 19 percent by the year's end, the government says, although the IMF sees that figure rising to as much as 20.8 percent.