Money, Spain
Spain keeps your pension contributions when you leave. A two-year rule decides whether they ever pay out
Every Spanish payslip shows a deduction for contingencias comunes, and the employer pays about five times as much again on top. Most foreign workers read that line as tax. It is closer to savings, except that Spain decides the terms on which you ever see it again, and those terms are stricter than almost anyone assumes when they sign a first contract. Leave Spain with eleven years of contributions and you will never draw a Spanish pension from them. Leave with sixteen and you may still lose it, because of a second condition that has nothing to do with how long you paid.
What a Spanish pension actually asks for
A contributory retirement pension in Spain needs fifteen years of contributions, which the Social Security counts in days: 5,475 of them. Article 205 of the General Social Security Law adds a second test that most people never read. At least two of those years must fall within the fifteen years immediately before you retire. In 2026 the ordinary retirement age is 66 years and 10 months, or 65 if you have contributed for 38 years and 3 months, and it settles at 67 from 2027.
What Spain does not have is a refund. Some countries pay foreign workers back their contributions when they leave for good. Spain keeps them on your record indefinitely, which sounds generous until you see the arithmetic. Contributions that never reach a pension stay on the record and produce nothing.
The two-year rule that catches people who leave
Take an engineer who arrives at 28 and works in Spain until 44. Sixteen years, comfortably past the minimum. Then a family reason or a better offer takes them back home, and they stop contributing to Spain entirely. At 67 they apply. The fifteen years before that application run from age 52 to 67, and there is not a single Spanish contribution inside them. Under the rule as written, the second test fails and the pension is refused, sixteen years of contributions notwithstanding.
The law has one softening. If you are still in the system when you stop paying, technically in alta or a situation treated as alta without an obligation to contribute, the two years are counted backwards from the date your obligation ended, not from the date you retire. That is the door the rest of this piece is about, because the people who keep it open are almost always the ones who planned for it before they left.
Where your passport changes the arithmetic
Spain coordinates its pensions with three groups of countries, and which group you fall into decides whether years worked elsewhere help you reach those fifteen years. Inside the EU, regulations extend coordination to non-EU nationals who have lived legally in more than one member state, Denmark excepted. Years in Spain and Germany are added together to test eligibility, and each country then pays its own share for the time you spent there. Germany, for comparison, only asks for five years before it pays anything.
Outside the EU, Spain has bilateral agreements with most of Latin America, plus Morocco, Tunisia, Senegal, Cape Verde, the Philippines, China, Japan, Korea, Russia, Ukraine, Moldova, Andorra, Australia, Canada and the United States, and a multilateral Ibero-American agreement on top. A Colombian with nine years in Spain and ten in Bogotá can combine them. An Indian, Pakistani, Bangladeshi, Nepali or Nigerian worker cannot, because Spain has no agreement with any of those countries. Their Spanish record stands alone, and their years at home count for nothing toward it.
The lump sum some nationalities can take home
The same dividing line runs through unemployment benefit, and this is where the difference becomes cash in hand. A non-EU worker who loses a job in Spain, has a contributory unemployment benefit recognised and is a national of a country with a bilateral agreement can ask the public employment service, SEPE, to pay everything still owed in one go. Forty percent is paid in Spain. The other sixty percent is paid once the worker has presented themselves at the Spanish consulate in their home country, handed in their residence card, and waited out the thirty-day window, within ninety days of the first payment.
The price is steep and deliberately so. You commit to leaving within thirty days and not returning for three years, your residence permits lapse thirty days after the first payment, and you cannot buy your way back early by repaying the money. After the three years you get preferential access to a work permit, and previous temporary residence picks up where it left off toward permanent residence. For an Indian or Pakistani worker none of this is available at all. Their benefit is paid month by month, in Spain, to a jobseeker registered in Spain.
Leaving Spain is a money decision as much as an immigration one, and the order you do things in matters: the date you stop contributing, whether you sign a convenio especial, which country you move to next. Tell us your contribution history and your plans and we will work through what you would keep, what you would lose, and what is worth paying to protect it.
Paying in from abroad: the convenio especial
The convenio especial is a voluntary agreement with the Social Security treasury that lets you keep contributing after you stop working in Spain. Its general version is open to anyone who contributed at least 1,080 days, roughly three years, in the twelve years before leaving the system, and the ministerial order that regulates it says plainly that moving abroad does not end it. While it runs you are treated as being in alta, the years count toward the fifteen, and the two-year test keeps looking at recent contributions you are actually making.
You choose the base you pay on, within limits tied to your past contributions. The quota is 28.3 percent of that base, multiplied by a reducing coefficient of 0.94, plus the intergenerational equity surcharge, which is 0.9 percent of the base in 2026 and rises to 1.2 percent by 2029. On a base of €1,500 a month that works out at about €412 a month, which is real money for most people who have just moved home. Payment is by direct debit, so a Spanish bank account has to stay open, and anyone living abroad for more than six months a year must name a representative with an address in Spain. Three consecutive unpaid months, or five scattered ones, end the agreement.
Whether it is worth it is a sum you can do. Someone with fourteen years of contributions who needs one more is in a very different position from someone with six years who would need nine. For the first, a year or two of convenio payments can unlock a pension worth many times the cost. For the second, the honest answer is often that the money is better saved elsewhere.
What to decide before your last payslip
Most of the damage happens because people make the decision to leave first and look at the pension afterwards, when the options have narrowed. Request your informe de vida laboral, the official record of every day you have contributed, before you go, and check it against your own payslips. Work out where you stand against the fifteen years and against the two-year test at the age you will actually retire. If you are an EU-to-EU mover, the years will follow you without a form. If you are going home to a country Spain has an agreement with, find out what that agreement lets you add. And if you are going home to India or Pakistan, the convenio especial and the decision about when to stop contributing are the only tools you have, so treat them as part of the move.
Frequently asked questions
How many years do I need to work in Spain to get a pension?
Fifteen years of contributions, which the Social Security counts as 5,475 days. Two of those years must fall within the fifteen years immediately before you retire. In 2026 the ordinary retirement age is 66 years and 10 months, or 65 for someone with at least 38 years and 3 months of contributions, and it reaches 67 from 2027.
Can I get my Spanish social security contributions refunded if I leave Spain?
No. Spain has no scheme that refunds pension contributions to a worker who leaves. The contributions stay on your record for good, and they only turn into money if you meet the conditions for a pension, either on Spanish years alone or by adding years from a country Spain has a coordination agreement with.
Does Spain have a social security agreement with India or Pakistan?
No. Spain's bilateral agreements cover most of Latin America, Morocco, Tunisia, Senegal, Cape Verde, the Philippines, China, Japan, Korea, Russia, Ukraine, Moldova, Andorra, Australia, Canada and the United States. India, Pakistan, Bangladesh, Nepal and Nigeria are not on the list, so years worked there cannot be added to Spanish years to reach the fifteen-year minimum.
Can a foreign worker take their Spanish unemployment benefit home as a lump sum?
Only nationals of a country with a bilateral social security agreement with Spain. They can ask for the remaining contributory benefit as a single payment, 40 percent in Spain and 60 percent at a Spanish consulate at home, in exchange for leaving within 30 days and not returning for three years. Their residence permits lapse 30 days after the first payment. Indian and Pakistani nationals do not qualify.
Can I keep paying into Spanish Social Security after I leave Spain?
Usually, through the convenio especial, provided you contributed at least 1,080 days in the twelve years before you left the system. The agreement does not end because you move abroad. You choose a contribution base and pay 28.3 percent of it, reduced by a 0.94 coefficient, plus the 0.9 percent intergenerational surcharge in 2026, by direct debit, and anyone living abroad more than six months a year must name a representative with an address in Spain.
Retirement ages, contribution rates, the intergenerational equity surcharge and the list of countries with which Spain has social security agreements are set by law and change over time; the figures here reflect the rules in force in 2026. Pension eligibility depends on your full contribution record, so confirm your own position against your vida laboral before making a decision to stop contributing.
Keep exploring
One door always opens another.
Pull the next thread. Each one ends somewhere useful, a clearer shortlist, a real number, a plan you can keep, whether or not you ever work with us.
See where you fit on the map
Slide your grades and budget and watch Europe light up with your real matches.
Open thisTake the two minute assessment
A few honest questions and you walk away with a personal blueprint, free.
Open thisStudy in Germany
Free public tuition and the strongest job market in Europe.
Open thisStudy in Italy
Income based tuition and some of the most generous aid on the continent.
Open thisStudy in France
World names, tiny public fees, a generous safety net.
Open thisRead the hard truths
The traps agents paid by commission will never warn you about.
Open thisAsk us on WhatsApp
One honest message. No script, no pressure, a real person who has walked it.
Open thisWe do this for you, properly, every time.
Don't navigate this alone. Take the free 2-minute path finder and get a personalised read on exactly where you stand.
This guide reflects Visagrad's own view and information gathered at the time of writing. Rules, fees, deadlines and timelines can change quickly, and some details may already have moved. Nothing here is official, legal or immigration advice. For accurate, up-to-date guidance built around your own situation, speak with us first.
