Which country taxes your 401(k), IRA, or Social Security when you live in Spain? Article 18 of the 1990 Spain-US Double Tax Treaty assigns taxing rights over private pensions to the residence country — but government pensions, Social Security, the saving clause, and Roth IRAs each create their own exceptions. A complete analysis for US expats in Spain.
Retirement income is frequently the largest item on the tax return of an American living in Spain. A 401(k) accumulated over decades of US employment, an Individual Retirement Account, Social Security benefits, a former employer's defined-benefit plan — all of these can produce significant annual income at the very moment a retiree has relocated to Spain and become a Spanish tax resident. Getting the treaty analysis right is therefore not a matter of academic interest; it can determine whether the same income is taxed once, taxed twice, or mistakenly exempted from tax altogether.
This article provides a comprehensive analysis of Article 18 of the 1990 Convention between the United States of America and the Kingdom of Spain for the Avoidance of Double Taxation and the Prevention of Fiscal Evasion with Respect to Taxes on Income (the "Treaty"), together with the related provisions of Articles 19, 20, and 21 that govern government pensions and Social Security. All relevant DGT binding consultations, the Spanish IRPF framework, and the interaction with the Beckham Law regime are addressed in full.
Article 18 of the Spain-US Treaty governs private pensions and annuities — that is, pensions paid in connection with past private-sector employment, as well as commercially purchased annuities. The provision sets out the primary rule for allocating taxing rights between the two contracting states in unambiguous terms: pensions paid "in consideration of past employment" and annuities are, in principle, taxable only in the state of residence of the recipient.
This is the residence-country rule, and it is the foundational principle from which all other analysis departs. A Spanish tax resident who receives a 401(k) distribution or a private pension from a former US employer is, under Article 18, taxable only in Spain. The United States — as the source country where the pension was generated — surrenders its taxing right under the Treaty to Spain as the residence country.
The practical consequence is straightforward for most private pensions: Spain collects the IRPF, and the US should not withhold federal income tax on the distribution. The mechanism for establishing the Treaty claim with the US pension administrator is Form W-8BEN, which the Spanish tax resident submits to the US payer to claim treaty benefits and prevent or reduce US withholding at source.
However, the Treaty's architecture is more complex than this headline rule suggests. Four major exceptions and qualifications reshape the landscape significantly: (i) the government pensions exception under Article 19; (ii) the Social Security provisions; (iii) the US saving clause, which preserves the US's right to tax its own citizens regardless of the Treaty; and (iv) the treatment of Roth IRAs, which are not straightforwardly within the Treaty's pension provisions.
The phrase "in consideration of past employment" is the key qualifier in Article 18(1). It covers pension income that arises as a result of employment services previously rendered — i.e., the pension was earned by the recipient through their working life. This encompasses:
The concept of "past employment" is broad. It is not limited to income from a pension plan contributed to by an employer — it extends to any pension arrangement whose economic origin is the taxpayer's working life. An IRA funded entirely by the individual from their own after-tax employment income also qualifies under this provision, because the source of those contributions was employment.
Commercially purchased annuities — i.e., annuities bought independently of any employment relationship, funded with investment capital rather than earned income — also fall within Article 18, though under a slightly different paragraph. The Treaty's scope is wide enough to cover most common US retirement income vehicles.
Article 19 of the Treaty creates a critical and frequently overlooked exception to the residence-country rule: pensions paid by the US federal government, a US state government, or any US governmental subdivision in respect of services rendered to that government are taxable only in the United States — not in Spain.
This "government service" exception applies regardless of where the recipient now lives. A retired US federal civil servant who moves to Spain and begins receiving their federal pension continues to pay US income tax on that pension. Spain must exempt this income from Spanish IRPF under its Treaty obligations. The US retains exclusive taxing rights because the pension arises from services rendered to the US government, and the Treaty reflects the traditional international law principle that a state should be entitled to tax remuneration paid to those who served it.
There is an important exception to the Article 19 exception: if the recipient of the government pension is a Spanish national who is also a Spanish tax resident (but not a US citizen), then Spain — not the US — may tax the pension. This "nationality" carve-out in Article 19(2) is rarely relevant in practice for US expats in Spain, who are almost always US citizens, but it should be noted for completeness.
The distinction between government and private pensions is therefore the first question to resolve in any Spain-US pension tax analysis. A retired US federal employee who also has a 401(k) from a private-sector job held earlier in their career faces a split position: the federal pension under Article 19 (US taxes only); the 401(k) under Article 18 (Spain taxes as residence country).
US Social Security benefits paid to a Spanish tax resident do not fit neatly within Article 18. Social Security is not strictly a pension "in consideration of past employment" in the Treaty sense — it is a statutory entitlement under US federal law, partially contributory but fundamentally a social insurance program administered by the US government.
The 1990 Treaty does not contain a dedicated article governing Social Security comparable to the provisions found in more modern US treaties. The analysis therefore turns on Articles 20 and 21 — the "Other Income" provisions — together with the specific language of Article 18 itself.
Spain's AEAT and the DGT have generally treated US Social Security payments received by Spanish tax residents as falling under Article 21 of the Treaty (Other Income), which provides that income not dealt with elsewhere in the Treaty is taxable only in the residence state of the beneficial owner. Under this analysis, Spain as residence country would have the exclusive right to tax US Social Security received by a Spanish resident.
However, the US takes a significantly different position. Under domestic US law (Section 871 of the Internal Revenue Code), up to 85% of Social Security benefits paid to non-resident aliens are subject to a 30% US withholding tax (or a reduced treaty rate where applicable). The US does not accept that the Spain-US Treaty wholly eliminates its right to tax Social Security benefits paid to Spanish residents who are not US citizens.
The practical result for non-US-citizen Spanish residents receiving US Social Security is that US Social Security Administration (SSA) may withhold at 30% (or a lower treaty rate, which under the Spain-US Treaty is reduced to 15% for qualifying pension-type payments in some circumstances). The Spanish resident must then declare the net Social Security income in Spain, with a credit for the US tax withheld, to avoid double taxation.
A separate but related consideration is the US-Spain Social Security Totalization Agreement, which coordinates Social Security coverage to prevent dual contributions. The Totalization Agreement is distinct from the double tax treaty — it governs which country's Social Security system an individual contributes to during their working life, not the taxation of benefits received in retirement. Workers in Spain with a US work history should review both instruments.
Perhaps the most important — and most misunderstood — provision of the Spain-US Treaty for US expats is the saving clause in Article 1(3). This provision states that the Treaty does not prevent either contracting state from taxing its own residents (in the case of Spain) or its residents and citizens (in the case of the US) as if the Treaty had never existed.
The practical effect for US citizens is stark: regardless of what Article 18 says about the residence country having the exclusive taxing right, the United States retains the right to tax its citizens on their worldwide income — including pension income received in Spain — under US domestic law. The Treaty does not protect a US citizen from US taxation on Spanish-residence-country pension income. Article 18 assigns the residence-country taxing right to Spain, but the saving clause permits the US to also tax its citizens on the same income.
For US citizens in Spain, the practical workflow for pension income is therefore:
Spain taxes at generally higher rates than the US for pension income (particularly at higher income levels), so the credit usually eliminates most or all of the US tax liability. However, the mechanics must be executed correctly, and excess credits or credit basket limitations can create residual US tax in some scenarios.
A 401(k) plan — the most common US employer-sponsored retirement savings vehicle — is squarely within Article 18. Distributions from a 401(k) plan paid to a Spanish tax resident are taxable only in Spain under the Treaty's residence-country rule (subject to the saving clause for US citizens).
Spain characterises 401(k) distributions as rendimientos del trabajo — employment income — under Article 17 of the Ley 35/2006 del IRPF. This is because the contributions were made in connection with the taxpayer's employment and were, in the US, deferred compensation. The AEAT treats the entire distribution (contributions plus accumulated earnings) as income from the general tax base (base imponible general), not the savings tax base. This means the distributions are taxed at general scale rates, which range from 19% to 47% depending on the autonomous community, rather than at the lower savings income rates (19%–28%) applicable to investment income.
Article 18(2) of the LIRPF provides a 30% reduction on rendimientos del trabajo that were generated over a period of more than two years and are received as a lump sum (irregular income, or rendimientos irregulares). This reduction can apply to 401(k) lump-sum distributions where the plan was contributed to over more than two years — which is virtually always the case for a typical US career 401(k).
The reduction applies to the amount that exceeds the average annual income from the work relationship. There is also a cap: the reduction applies to the first €300,000 of irregular employment income. For larger 401(k) balances, the amounts above €300,000 do not benefit from the reduction.
For non-US-citizen Spanish residents receiving 401(k) distributions, the primary administrative step is to file Form W-8BEN with the 401(k) plan administrator or the financial institution making the distribution. This form certifies the recipient's status as a non-US person and claims the applicable treaty benefit under Article 18, reducing or eliminating US withholding tax on the distribution. Without this form, the payer will generally withhold at the default 20% US withholding rate (or 30% for certain non-periodic distributions).
US citizens cannot use Form W-8BEN — they must provide their Social Security number and are subject to US withholding rules as US persons, regardless of their Spanish residency. However, they can adjust the withholding amount to reflect anticipated foreign tax credits.
Traditional IRA distributions — including SEP-IRA and SIMPLE IRA distributions — follow the same analytical framework as 401(k) distributions under Article 18. The Treaty's residence-country rule applies, Spain taxes as rendimientos del trabajo, and the same 30% reduction analysis under Article 18(2) LIRPF is available for qualifying lump-sum distributions.
The DGT has consistently confirmed in its binding consultations (including V1194-11 and subsequent consultations) that US IRAs are treated as pension accounts for Spanish IRPF purposes, with distributions characterised as rendimientos del trabajo rather than as rendimientos del capital mobiliario. This is an important distinction: employment income is taxed at higher marginal rates than savings income, but the 30% irregular income reduction partially offsets this.
For IRA rollovers and conversions — for example, a Traditional IRA to Roth IRA conversion — the Spanish treatment is more complex. A conversion that is taxable in the US (because the IRA funds are pre-tax) could trigger a Spanish IRPF liability in the same year, even if no cash was physically received. Professional advice is essential before executing any IRA conversion while Spanish tax-resident.
The Roth IRA presents a distinctive problem under Article 18. As discussed in our dedicated article on Roth IRAs in Spain (see related content), the Treaty does not specifically address Roth IRAs — they were created in 1997, seven years after the Treaty was signed. Spain does not recognise the Roth's tax-free character.
The fundamental tension is this: a Roth IRA distribution is not a "pension paid in consideration of past employment" in the traditional sense, because the contributions were made from after-tax dollars that already bore income tax. In the US, those contributions were not deducted from income; the account is funded with taxed money. This distinguishes the Roth from a Traditional IRA or 401(k), where contributions were pre-tax and the entire distribution represents deferred compensation.
The DGT's position, as set out in DGT binding rulings on Roth IRA and related consultations, is:
Unlike Traditional IRA and 401(k) distributions, Roth investment return distributions are taxed at the lower savings income rates rather than as employment income — but the tax-free treatment that US law provides is completely disregarded. For a detailed analysis of the Roth IRA specifically, including Modelo 720 obligations and planning strategies around the Beckham Law window, see our separate dedicated article.
The distinction between a lump-sum pension distribution and periodic pension payments is significant under Spanish IRPF law, and it interacts directly with Article 18 of the Treaty.
Periodic pension payments — regular monthly or quarterly distributions from a 401(k), IRA, or employer defined-benefit pension — are taxed as rendimientos del trabajo in the year they are received. No reduction applies. The full payment is added to the taxpayer's general taxable base and taxed at the marginal rate applicable to their total income. For a Spanish tax resident receiving substantial pension income, marginal rates can reach 47% (including both state and autonomous community tax) in regions such as Cataluña or Extremadura, or be as low as 43.5% in Madrid.
A single lump-sum distribution — for example, a full account liquidation triggered by reaching age 72 and taking all assets in one year — can potentially qualify for the 30% irregular income reduction under Article 18(2) LIRPF, provided:
The five-year rule on the 30% reduction is critical for US expats with multiple retirement accounts. If a taxpayer takes a 401(k) lump sum in Year 1 and claims the 30% reduction, they cannot claim it again on a Traditional IRA distribution until Year 6. This sequencing of distributions across tax years can significantly affect the total Spanish tax cost.
The same Article 18 framework operates in reverse for a US tax resident who receives a Spanish state pension (pensión del INSS) from Spain. Under the Treaty's residence-country rule, the Spanish state pension paid to a US resident is taxable only in the United States. Spain — as the source country — surrenders its taxing right under the Treaty.
This means a retired Spanish worker who has moved to the United States and now receives their Spanish INSS pension will declare that income on their US Form 1040 and pay US federal income tax on it. Spain should not withhold Spanish income tax at source on these payments (IRNR withholding), provided the US resident has submitted the appropriate documentation to the INSS and the AEAT establishing their US residence and claiming Treaty benefits.
In practice, the INSS's administration of Treaty benefits for non-residents can be slow and documentation-heavy. US residents receiving Spanish state pensions often find that Spanish withholding occurs initially, requiring subsequent reclaim proceedings through the AEAT. The reclaim process (using Modelo 210) can recover these amounts, but it requires prompt action and proper documentation.
As with the US-to-Spain direction, the saving clause operates here too: if the US resident is a Spanish citizen (and Spain's equivalent of the saving clause applies), Spain may have additional taxing rights. The analysis should be reviewed with counsel in both jurisdictions.
Spain's special expatriate tax regime under Article 93 LIRPF — commonly known as the Beckham Law — provides that qualifying new residents are taxed as non-residents on their Spanish-source income (and on certain foreign-source income) at a flat 24% rate for up to six years, rather than at the progressive IRPF general scale.
For US pension income (Article 18 income), the interaction with the Beckham Law is highly favourable in the early years of Spanish residency. A Spanish resident who has opted into the Beckham Law regime and receives 401(k) or IRA distributions will be taxed at 24% on that income rather than at progressive rates that could reach 47%. This represents a substantial saving compared to the standard IRPF treatment.
This planning opportunity is particularly valuable for recently relocated US executives or professionals who have significant accumulated retirement account balances and can take substantial distributions during the Beckham period. Once the Beckham period ends (after six years), distributions revert to full progressive IRPF taxation. Pre-migration planning to maximise withdrawals during the Beckham window — while managing the US foreign tax credit position — is a key element of the advice we provide to US clients relocating to Spain.
It is important to note that the Beckham Law does not affect the application of the Treaty's allocation rules — Article 18 still governs which country has the taxing right. The Beckham Law determines the rate at which Spain taxes Article 18 income once Spain has been confirmed as the residence-country taxing state.
For taxpayers outside the Beckham Law regime, pension income is taxed at standard IRPF general scale rates. These rates have a state component and an autonomous community component. The combined 2025 scale at national level is:
| Taxable General Base | Approximate Combined IRPF Rate |
|---|---|
| Up to €12,450 | 19% |
| €12,451 – €20,200 | 24% |
| €20,201 – €35,200 | 30% |
| €35,201 – €60,000 | 37% |
| €60,001 – €300,000 | 45% |
| Over €300,000 | 47% |
The autonomous community rate varies. Madrid offers the most favourable regime (combined top rate of approximately 43.5%), while Cataluña, Valencia, and Extremadura impose higher combined top rates of up to 50%–54%. For US expats choosing where to establish tax residence in Spain, the regional IRPF rate on pension income is an important consideration — particularly for retirees with substantial 401(k) balances.
There are also personal allowances and minimum vital income deductions (mínimo personal y familiar) that reduce the taxable base before rates apply. For a single adult taxpayer, the personal minimum exemption is €5,550 (national rate; higher for those aged 65 or over). These allowances are modest relative to typical US pension income and do not fundamentally change the rate analysis.
Form W-8BEN (Certificate of Foreign Status of Beneficial Owner for United States Tax Withholding and Reporting) is the primary document through which a Spanish tax resident who is not a US citizen establishes their entitlement to reduced or zero US withholding on pension distributions under the Treaty.
The form must be submitted to the US pension administrator or financial institution before distributions begin. Key practical points:
Many US pension administrators and financial institutions are unfamiliar with the Spain-US Treaty and may initially resist claims for reduced withholding. A formal treaty claim letter from the taxpayer's Spanish tax counsel, accompanied by the properly completed W-8BEN, typically resolves these issues. If withholding has been incorrectly applied despite a valid W-8BEN, the non-citizen Spanish resident can reclaim the over-withheld US tax by filing a US non-resident income tax return (Form 1040-NR).
For US citizens in Spain — who face both US and Spanish taxation on the same pension income due to the saving clause — the principal relief mechanism is the foreign tax credit under Section 901 of the US Internal Revenue Code, claimed on Form 1116.
The mechanics work as follows: Spanish IRPF is paid first (Spain being the primary taxing country under Article 18, and typically having higher rates for pension income). The US then taxes the same income on Form 1040, but a credit is allowed for the Spanish income tax paid. The credit is capped at the US tax that would otherwise be due on the same income — i.e., you cannot use excess Spanish tax credits to offset US tax on other income categories without careful basket management.
In most cases where the Spanish IRPF rate on pension income exceeds the effective US federal rate (which is common given Spain's higher progressive rates), the credit fully eliminates the US federal tax on the pension income, and a surplus credit results. Excess credits in the general income basket can be carried forward ten years under US rules.
A common pitfall is attempting to claim Spanish IRPF credits on a calendar-year basis when the Spanish and US tax years are misaligned in practice (due to different filing and payment dates). Form 1116 credit claims must be matched to the year in which the Spanish tax was accrued, not the year it was paid, to be used in the correct US tax year.
DGT Established Criterion is one of the most directly relevant administrative authorities on the Spanish tax treatment of US pension distributions for Spanish tax residents. In this consultation, the DGT addressed a taxpayer who, having worked in the United States for many years and contributed to a 401(k) plan, had subsequently become a tax resident in Spain and was beginning to take distributions.
The DGT confirmed the following key points in this established DGT criterion:
this established DGT criterion also addressed the Modelo 720 reporting obligation for the 401(k) account prior to distributions commencing, confirming that a 401(k) plan qualifies as a "foreign financial account" for Modelo 720 purposes and must be reported if the aggregate balance exceeds €50,000. This reporting obligation exists independently of whether any distributions have been made during the year.
For US citizens, Article 18 of the Treaty does not prevent the US from taxing your 401(k) distributions — the saving clause preserves US taxing rights for its citizens regardless of Spanish residency. However, the 20% withholding should reflect your expected US federal tax liability on the distribution, adjusted for foreign tax credits you will claim for Spanish IRPF paid. You should review your withholding rate with your US tax advisor to ensure it is calibrated to your actual expected US liability after the Form 1116 credit. You may be able to reduce US withholding by submitting a Form W-4P with adjusted withholding, reflecting the expected credit offset.
The two income streams are treated very differently. The federal government pension falls under Article 19 of the Treaty — it is taxable only in the United States, and Spain must exempt it from Spanish IRPF. The 401(k) falls under Article 18 — it is taxable in Spain as your country of residence (subject to the saving clause if you are a US citizen). You will need to file a Spanish IRPF return reporting only the 401(k) income, and a US return reporting both streams (with a credit for Spanish tax on the 401(k) if you are a US citizen).
Provided the IRA was contributed to over more than two years (almost always the case), a lump-sum distribution may qualify for the 30% irregular income reduction under Article 18(2) LIRPF. The reduction applies to the first €300,000 of qualifying income. However, taking a large lump sum in a single year may push you into the highest IRPF brackets even after the reduction. A careful comparison of the net Spanish tax cost across multiple distribution strategies — spread over years vs. single lump sum — is essential before making this decision. Additionally, if you are eligible for the Beckham Law, distributing during the Beckham period at 24% flat may be more advantageous than the irregular income reduction at general scale rates.
Under the Treaty analysis, Spain has a strong claim to be the exclusive taxing country for US Social Security paid to a non-US-citizen Spanish resident, on the basis that it constitutes "other income" under Article 21. However, the US Social Security Administration may initially withhold a percentage of the benefit. Your husband should consult with an international tax advisor to claim Treaty benefits from the SSA, potentially reducing or eliminating US withholding, and should declare the net income received in Spain on his annual IRPF return with a credit for any US tax withheld.
Yes — timing matters enormously. A Roth conversion is a taxable event in the US in the year it occurs. If you execute the conversion before establishing Spanish tax residency, the income is taxable only in the US (assuming you are not yet a Spanish tax resident on the date of conversion). If you convert after becoming a Spanish tax resident, Spain will also seek to tax the conversion as rendimientos del trabajo, creating a dual tax charge that may not be fully relieved by the foreign tax credit depending on the relative rates. In general, completing Roth conversions before arrival in Spain is significantly more tax-efficient. The precise analysis depends on your circumstances and residency establishment date — early planning with both US and Spanish tax counsel is strongly recommended.
Jacob Salama advises US expats and Spanish residents on all aspects of the Spain-US Double Tax Treaty, including the correct Spanish IRPF treatment of 401(k) plans, IRAs, Social Security, and government pensions. Book a free 30-minute consultation to discuss your situation.
Recurring filing
Once the treaty question is settled, the pension still has to go on a return every year. We file it as a fixed-fee service: living in Spain on a foreign pension.