Hello,

I'm moving from the US to Spain, where I will work from home for my US employer, who will pay me in my US bank account. I have already obtained a non-lucrative visa for Spain.

I know with a non-lucrative visa, you may not work in Spain. But I've read that this visa is only meant to prevent you from taking a job from the Spanish economy, and freelancers or remote employees of foreign companies may use it. I was very clear about my situation at my local Spanish consulate when applying for the visa, and they granted me the visa.

But I don't know if I must pay income tax in Spain. I read that after 183 days in Spain, the Spanish tax authority will charge you income tax on world-wide income. But is this also true for people on a non-lucrative visa? The only information I can find says that residents with this visa will be taxed on capital gains from investments and "passive income", but they will not be taxed on pension payments (according to the US-Spain tax treaty). I think those are the two main types of people who use the non-lucrative visa: independently wealthy people and pensioners. But what about my situation? Must I pay Spanish income tax, despite being paid in the US by a US employer, and being ineligible for certain Spanish benefits on this visa such as public health care?

I definitely must pay US income tax. If I must also pay Spanish income tax, the US-Spain tax treaty says that one must first pay one country, and then deduct that amount of tax when paying the second country. So if I pay Spain first, I'll probably owe the US nothing since taxes are generally higher in Spain. If I pay the US first, I'll probably still owe Spain some. But which country do I pay first? Since I'll be paid in the US, they will definitely withhold money from my salary for taxes. But the IRS (US tax authority) is also very clear that money earned while living in another country is "foreign" income, even if you're paid in the US by a US employer. So... which country gets paid their taxes first?

I'd be very grateful to hear from anyone who has some insight here.