The COVID-19 pandemic in Spain  is part of the pandemic of coronavirus disease 2019 (COVID-19) caused by severe acute respiratory syndrome coronavirus 2 (SARS-CoV-2). The virus was first confirmed to have spread to Spain on 31 January 2020, when a German tourist tested positive for SARS-CoV-2 in La Gomera, Canary Islands. By 13 March, cases had been confirmed in all 50 provinces of the country.

The lockdown was imposed on 14 March 2020. On 29 March, it was announced that, beginning the following day, all non-essential workers were ordered to remain at home for the next 14 days. By late March, the Community of Madrid has recorded the most cases and deaths in the country. Medical professionals and those who live in retirement homes have experienced especially high infection rates. On 25 March, the death toll in Spain surpassed that of mainland China, and only that of Italy was higher. On 2 April, 950 people died of the virus in a 24-hour period—at the time, the most by any country in a single day.

As of 3 July 2020, there have been 250,545 confirmed cases and 28,385 deaths. The actual number of cases was considered to be much higher, as many people with only mild or no symptoms were unlikely to have been tested. On 6 July 2020, the results of the third and last wave of a Spanish Government nationwide seroprevalence study showed that about two million people, or 5.2% of the population, could have been infected during the pandemic, confirming the data from previous waves a figure ten times higher than the number of confirmed cases on that date.

On 15 March the national lockdown due to the State of Alarm becomes effective. All residents are mandated to remain in their normal residences except to purchase food and medicines, work or attend emergencies. Lockdown restrictions also mandated the temporary closure of non-essential shops and businesses, including bars, restaurants, cafes, cinemas and commercial and retail businesses, while also announcing that the government will be able to take over private healthcare providers, if needed. The announcement came following significant increases in the number of confirmed cases of COVID-19 in Spain, increasing by 66% from 3,146 cases to 5,232 cases on 13 March 2020.

On 17 March, PM Pedro Sánchez announces a support package of more than 200 billion euros, almost 20% of the Spanish GDP, to cushion the impact of the coronavirus crisis. The Royal Decree approved by his government also includes a moratorium on the payment of mortgages for workers and self-employed in economic vulnerability and for those affected by COVID-19, as well as the streamlining of temporary dismissal files (known as ERTE), support for workers and companies affected by downturns, measures to guarantee the liquidity of companies and to promote research to achieve a vaccine.

On 21 March, the Ministry of Health announces the purchase of 640,000 rapid tests and reports that more than 350,000 tests for COVID-19 had been conducted. On 22 March, Spanish PM Pedro Sánchez announces that he will take the petition to extend the State of Alarm in the nation until 11 April to the Congress after consultations with regional presidents. The President of the Region of Murcia orders the cessation of all non-essential economic activities, a decision later revoked by the central government.

The state of alarm expired at midnight of Sunday 21 June, and Spain entered a “new normality” phase, in which restrictions such as maximum occupancy in shops are handled by each autonomous community independently. At the state level, the government maintained the obligation to wear masks in public transportation and all other places where a minimum distance of 1.5 meters cannot be maintained; the government also opened all internal borders among autonomous communities as well as the land border with France, and resumed international flights with other European Union countries and the United Kingdom.