Last updated on 26 November 2026 · 7 min read
Permanent residence in Spain is reached after five years of continuous legal residence. Time abroad does not break that continuity if it stays within limits. For non-EU nationals, each absence may last up to six months and all absences together may not exceed ten months in the five years, or eighteen when they are for work. Citizens of the European Union follow a different rule. Once you hold the status it can still be lost, after twelve months outside the European Union or, for EU citizens, after two years outside Spain.
Key facts
- Three regimes. EU citizens and their families, national long-term residence and EU long-term residence. Which one applies depends on your nationality and on what you ask for.
- Non-EU nationals. Five years, with absences of up to six months each and ten months in total (Immigration Regulation, articles 176 and 183).
- Work absences. The total rises to eighteen months when the absences are for work.
- EU citizens. Five continuous years of legal residence (Royal Decree 240/2007, article 10).
- What you gain. The right to live and work in Spain indefinitely on the same terms as Spaniards.
- How it is lost. Twelve consecutive months outside the European Union for long-term permits. More than two consecutive years outside Spain for EU citizens.
People count the five years carefully and the absences hardly at all. Yet a long winter with family abroad, a posting or a year of study elsewhere can decide the application. The rules below are simple once each trip has a date on it.
In this guide
Which regime applies to you
- Right of permanent residence after five continuous years
- A certificate on request, or a permanent card for non-EU relatives
- Lost after more than two consecutive years away from Spain
- For non-EU nationals after five continuous years
- Residence and work in Spain without limit of time
- Lost after twelve consecutive months outside the EU
- The same five years, plus stable resources and health insurance
- Makes it easier to move to another EU country later
- Also lost after six years away from Spain
British citizens who were resident in Spain before the end of 2020 hold rights under the Withdrawal Agreement, which follows the EU model with its own rule on absences. Those who arrived later are non-EU nationals and follow the second or third column.
The five years and the absences for non-EU nationals
Both long-term permits ask for legal and continuous residence in Spain during the five years before the application. The regulation then says what does not break continuity.
| Rule | Limit |
|---|---|
| Each absence | Up to six continuous months |
| All absences in the five years | No more than ten months in total |
| All absences, when they are for work | No more than eighteen months in total |
| Force majeure | Duly justified absences are assessed case by case |
| Aid workers | Work abroad for a recognised organisation does not count against you |
- Months in Spain, at least50 months
- Absences allowed in total10 months
Both conditions apply at once. One absence of seven months fails even if it is the only one. Five absences of three months each also fail, because together they come to fifteen months.
Time spent in Spain as a student is treated differently. For EU long-term residence, periods of stay for studies count at half their length, and only if you are a resident when you apply. The clock that matters for most readers starts with the first residence permit, such as the non-lucrative or the digital nomad permit, and runs through each renewal.
Example
Maya counts her trips
Maya is Canadian. Her residence began on 1 March 2022 and she wants to apply in March 2027. She lists every period outside Spain from her passport and her flight records.
| Period abroad | Length | Reason |
|---|---|---|
| December 2022 to February 2023 | 3 months | Family |
| June to September 2024 | 4 months | Family |
| January to February 2025 | 2 months | Work for her Spanish employer |
| August to September 2026 | 2 months | Holiday |
No trip passes six months, but the total is eleven. Under the general limit Maya is one month over. Two of those months were for work, so she should document them. If the office accepts the work-related total of eighteen months, her continuity holds. If she had cut the summer of 2026 short, she would not depend on that argument.

EU citizens and their families
Citizens of the European Union, of the European Economic Area and of Switzerland, and the family members who live with them, acquire the right of permanent residence after five continuous years of legal residence in Spain. The right no longer depends on working or on having resources. On request the Foreigners’ Office issues a certificate of permanent residence, and non-EU relatives receive a permanent residence card.
For the family member’s card, the Royal Decree states that absences of more than six months in a year bring its validity to an end. Longer absences are accepted for military service, and a single absence of up to twelve consecutive months is accepted for pregnancy and childbirth, serious illness, studies, vocational training or a posting abroad. Continuity for the five years is assessed with the same yardstick.
Keeping the status once you have it
| Status | Lost through absence | Card |
|---|---|---|
| EU citizen with permanent residence | More than two consecutive years away from Spain | Certificate without expiry |
| National long-term residence | Twelve consecutive months outside the European Union | Renewed every five years, and every ten from the age of 30 |
| EU long-term residence | Twelve consecutive months outside the European Union, or six years away from Spain | Renewed periodically |
The card and the right are different things. A long-term resident whose card has expired is still a long-term resident and renews the card. A resident who has spent a full year outside the European Union may have lost the right itself, even with a card that looks valid. The regulation provides a procedure to recover the status in some cases, which is easier than starting again.
Keep your own record. Passports are no longer stamped on every border crossing. Keep boarding passes, tickets, payslips, school records and the town hall registration. They are what you will be asked for in five years.
How to count before you apply
- Fix the starting date.
The day your first residence permit took effect, not the day you arrived as a visitor. - List every absence.
Dates out and back, and the reason. Round nothing. - Apply both tests.
No absence over six months, and no more than ten months in total, or eighteen if they were for work. - Gather proof of presence.
Registration at the town hall, contracts, payslips, bank movements, medical or school records. - Choose the permit.
National long-term residence, or the EU version if you may move to another member state and can show resources and health insurance.
Living in Spain for most of each year has a tax side. More than 183 days in a calendar year makes you tax resident in Spain, which is the normal position of anyone who is building up five years of residence.
Mistakes we would check first
- Counting from the date of arrival as a tourist or as a student.
- Looking only at the total and overlooking one absence longer than six months.
- Letting a temporary permit lapse between renewals, which interrupts legal residence.
- Assuming that an investor permit held without living in Spain counts. See what remains of the golden visa.
- Moving abroad after obtaining the status and returning after more than a year.
Frequently asked questions
How long do I have to live in Spain to get permanent residence?
Five years of continuous legal residence, under the EU rules and under both long-term permits for non-EU nationals.
How many days can I spend outside Spain?
As a non-EU national, up to six months at a time and ten months in total during the five years, or eighteen months in total when the absences are for work.
Is permanent residence the same as citizenship?
No. Permanent residence lets you live and work in Spain indefinitely and keeps your nationality unchanged. Spanish nationality by residence is a separate procedure with its own periods and tests.
Can I lose permanent residence?
Yes. A long-term permit ends after twelve consecutive months outside the European Union. An EU citizen loses the right after more than two consecutive years away from Spain.
Do years as a student count?
For EU long-term residence they count at half their length. They are stays, not residence, so they do not count in full.
Keep your town hall registration current while you build up the years. Non-EU residents without long-term residence must renew it every two years, as our padrón guide explains.
What to read next
This guide explains the general rules. It is not legal advice for your situation, and each office can ask for more than the minimum. Read our disclaimer.
Written by Estela Cortés Cortillas, lawyer, Barcelona Bar (ICAB no. 47590). Last reviewed on 26 November 2026.