In response to the COVID-19 outbreak, the Spanish government declared a State of Alarm that lasted from the 14 th of March 2020 to the 21 st of June 2020. The main measure put in place was a lockdown that suspended most of the activities and the movements in the entire country. The present work investigates the effects of this anti COVID-19 measure on the national electrical energy sector. The lockdown is found to have caused an average decrease in electricity demand of 11%, followed by a more severe drop in electricity prices of 0.09 €/MWh per each GWh of missed daily demand. These led to an average turnover reduction of 6.1 million € per day for the electricity sector. The losses are found to be unevenly distributed across the different power technologies of the energy mix. In particular, the performance of photovoltaics, the fastest growing technology in the country, is investigated in-depth. During the lockdown, for the first time, photovoltaics provided more than 9% of the national electricity, more than double than the previous annual maximum. However, despite the expectations related to the improved air quality, the average capacity factor of photovoltaic systems is found to be lower than in the previous years. The reasons behind this are investigated through the analysis of the behaviors of the environmental factors affecting this technology's performance.