Having a residence permit (permiso de residencia) does not by itself determine whether you are a tax resident in Spain. Technically, when the first property in Spain is purchased, the agent files the census declaration (Modelo 030) with the foreigner's number at the Spanish Tax Agency…
Having a residence permit (permiso de residencia) does not by itself determine whether you are a tax resident in Spain.
Technically, when the first property in Spain is purchased, the agent files the census declaration (Modelo 030) with the foreigner's number at the Spanish Tax Agency to register the taxpayer, stating (if Modelo 030 is filled in correctly) non-resident status.
Later, when a residence permit is issued, the immigration office (extranjería) informs the Spanish Tax Agency, which automatically changes the status from non-resident to resident and therefore expects an annual Modelo 100 return, the personal income tax for residents. That is why residence renewals often also require a
certificate showing no outstanding debts with the Spanish Tax Agency
because the internal check between the two authorities comes back negative.
In some cases, the content of this certificate can be corrected by going to the tax office and providing proof of the
Modelos 210 filed as a non-resident
despite holding a resident's card from the immigration office.
So I want to stress that having a residence permit in Spain and being a tax non-resident is perfectly compatible and legal in certain situations. Every taxpayer can be a tax resident in only one country in any given year (except for borderline cases where residence changes during the year) and is therefore a non-resident for tax purposes in all other countries where they hold assets.