Long-term study stay permit and study visa (higher education)
For full-time degree study at an authorised Spanish institution, for stays over 90 days. From abroad you apply in person at the Spanish consulate or embassy for where you live, at least two months before your course starts. The consulate decides within one month. The permit runs for the whole course. If you stay more than six months, you must apply for a foreigner identity card (TIE) within one month of arrival. Rules: Royal Decree 1155/2024, in force since 20 May 2025.
Official page for Long-term study stay permit and study visa (higher education)(opens in a new tab)