Residency rule, Spain

Spain Citizenship — Time Away

Summary

Spanish citizenship by residence needs legal residence that is continuous and comes right before your application: 10 years in the general case, 5 for refugees, 2 for nationals of some countries and 1 in cases such as marriage to a Spaniard. The Civil Code gives no number of days that you may spend abroad. The Ministry of Justice, and the courts after it, judge each case, and a long absence can break the continuity. Many people use 6 months in a row as a warning line, but it is not a legal limit.

Limit in the law
None in days. Residence must be legal, continuous and right before you apply
Warning line used here
One absence of 6 months in a row (180 days in the app)
Years needed
10, or 5, 2 or 1 depending on your case
Law
Civil Code, article 22, and Royal Decree 1004/2015
Run by
Ministry of Justice

Who it applies to

The rule

Article 22 of the Civil Code sets the time of residence. Paragraph 1 asks for 10 years. Five years are enough for people who have refugee status. Two years are enough for nationals by origin of Ibero-American countries, Andorra, the Philippines, Equatorial Guinea or Portugal, and for Sephardic Jews. Paragraph 2 asks for 1 year in some cases, among them a person born in Spain, a person who has been married to a Spaniard for 1 year and is not separated, and a person born outside Spain to a parent or grandparent who was Spanish by origin.

Paragraph 3 holds the part that matters for travel. In all cases the residence must be legal, continuous and immediately before the application. Legal means you held a valid residence permit for the whole time. Immediately before means the years end on the day you apply. Continuous means without a real break. The Civil Code does not say how many days or months abroad make a break.

Because the law gives no number, each case is judged on its facts. The Ministry of Justice decides the application, and a refusal can be taken to the administrative courts (paragraph 5). The law does not list what is looked at. The question is whether your residence in Spain really continued, so it helps to be able to show how long each absence was, why you left, and what you kept in Spain during that time, such as your job, your family and your home. A stay of many months in another country can be read as living there.

You must also show good civic conduct and a sufficient degree of integration into Spanish society (paragraph 4). Royal Decree 1004/2015 sets the procedure. A different regulation, for long-term residence, uses fixed limits of 6 months in a row and 10 months in total over 5 years. Those numbers do not bind citizenship decisions, but they show what Spanish immigration rules treat as a long absence.

Why it exists

Citizenship by residence is meant for people who have really made their life in Spain. The years of residence are the proof of that tie. A person who holds a Spanish permit but lives in another country for long periods does not show the same tie, so the law asks for residence that is continuous and still going on when the person applies.

Counting the days

The law has no day count, so what you count is the length of each absence from Spain during your residence years, to see how your file will look.

  1. Find the start of your qualifying period: the day your legal residence began, with no gap between permits.
  2. List every trip out of Spain in that period, with the day you left and the day you returned.
  3. Mark any absence close to 6 months in a row, and add up your total time away.
  4. For each long absence, collect proof of the reason and of what you kept in Spain: work contract, rent, family, school.
  5. Check that you still live in Spain on the day you apply, because the residence must come right before the application.
How Countr counts it. Countr counts the days of your current absence from Spain for Spain Citizenship — Time Away and warns you 30 days before 180 days. The 180 days are the app's own warning line for one long trip, taken as 6 months. Spanish law sets no fixed limit, so an absence under 180 days is not safe by rule, and one above it is not an automatic refusal. When you return to Spain the count starts again. The app does not track the qualifying period of 10, 5, 2 or 1 years, which is not a day count. If the app cannot see where you were on a day, the count starts over, so gaps make the number smaller, never bigger.

Track Spain Citizenship — Time Away on your phone.

Countr finds your past trips in your photos and keeps counting from there.

Examples

Normal travel over ten years

Ahmed has lived in Barcelona with a residence permit since 3 May 2017 and applies on 10 May 2027. Each year he spends 4 weeks with his family in Morocco and takes a few short trips. His job, his rented flat and his children's school are in Spain. No absence is longer than 30 days. Nothing in his travel suggests a break in continuous residence.

Seven months abroad in the middle

Luisa is Colombian and needs 2 years. Her legal residence starts on 1 March 2025. From 1 June 2026 to 20 December 2026 she lives in Bogotá, which is 202 days, and gives up her flat in Madrid. She applies on 1 March 2027. For more than a quarter of her 2 years she lived outside Spain with no home there. The ministry can find that her residence was not continuous and refuse the application.

A long absence with ties kept

Chen is sent by his Spanish employer to a project in Chile from 2 February 2027 to 20 July 2027, which is 168 days. He stays on the Spanish payroll, his wife and son remain in their home in Bilbao, and he returns to the same job. The absence is long, but it has a work reason and his home stayed in Spain. He keeps the posting letter and payslips to explain it in his application.

Exceptions

Common misconceptions

“The law lets me be away up to 6 months.”
The Civil Code gives no number. Six months is a warning line that many people use. A shorter absence can still be questioned, and a longer one with a good reason and strong ties to Spain is not refused automatically.
“Once I have my 10 years, it does not matter where I live when I apply.”
The residence must come immediately before the application. If you have moved away, the earlier years do not meet the rule.
“Any time I spent in Spain counts.”
Only legal residence counts. Time as a tourist or without papers does not, and a gap between permits can break the period.
“The rule for long-term residence, 10 months in 5 years, is the rule for citizenship.”
That rule belongs to the immigration regulation and to a different permit. It is a useful guide, but citizenship is decided under the Civil Code, case by case.

Questions and answers

How many days can I be outside Spain and still get citizenship?

There is no fixed number. The law asks for continuous residence and does not list what is checked. Each case is decided on its facts, so be ready to show how long your absences were, the reasons and the ties you kept in Spain.

Does a long trip restart my years of residence?

It can. If an absence is judged to have broken your continuous residence, the time before it may no longer count, and you would need a new full period before applying. The decision depends on the facts of your case.

Do holidays abroad count against me?

The Civil Code does not mention holidays. It asks only that your residence is continuous. A few weeks away each year, with your home and life still in Spain, is the normal life of a resident, but no rule gives a safe number of days.

Can I travel after I have applied?

The Civil Code measures residence up to the day you apply and sets no travel rule for the waiting time. The careful choice is to keep your residence permit valid and your home in Spain until the decision, because the ministry can still ask for reports and documents.

How is my time abroad checked?

Your passport shows entry and exit stamps, and during the procedure the ministry asks other public bodies for reports, always including the Ministry of the Interior. You should be ready to explain every long absence with documents.

Which nationalities need only 2 years?

Nationals by origin of Ibero-American countries, Andorra, the Philippines, Equatorial Guinea and Portugal, and Sephardic Jews. The 2 years must also be legal, continuous and right before the application.

Sources

Other rules for Spain

See all trackers

This page explains the rule and how the days are counted. It is not legal or tax advice. The authority decides each case on its own facts.