To enter and stay in Spain, and when crossing country borders within the Schengen area, nationals of countries outside the Schengen area must:
be in possession of a valid travel document (passport or ID card issued within the previous 10 years and valid for at least 3 months after the intended date of departure) or another valid document authorising them to cross the border;
be in possession of a valid Schengen visa or a valid residence permit issued by a Schengen state, unless they are specifically exempt pursuant to Regulation (EU) 2018/1806;
provide evidence of the purpose, conditions and duration of their intended stay and their means of subsistence, both for the duration of their intended stay and for the return to their country of origin/residence or transit to a third country to which they are certain to be admitted, or their ability to acquire such means lawfully;
not be the subject of an alert issued in the Schengen Information System for the purposes of refusing entry;
not be considered to pose a threat to the public order, internal security, public health or international relations of any Schengen country – i.e. no alert has been issued in any country’s national database for the purposes of refusing entry on such grounds.
N.B. All citizens must follow the Covid-19 restrictions (based on the decrees currently in force) before entering Spain from any other country (you can find them in English in the link below): https://www.sanidad.gob.es/en/profesionales/saludPublica/ccayes/alertasActual/nCov/spth.htm