Fiscal residency in Spain
The best advice in English that I can find is in this excellent post on the Andalucia forum
Any person who spends more than 183 days in Spain in any Spanish Tax year becomes tax resident.
The Spanish Tax Year is the calendar year (January 1st to December 31st) not the same as the Tax Year in the UK.
Tags: Completing a tax return in Spain