Beckham law

The "Beckham Law" (Royal Decree 687/2005) is a Spanish Tax Decree passed in June 2005. The law gained its nickname after the footballer David Beckham became one of the first foreigners to take advantage of it. However the law is aimed at all foreign workers (particularly the wealthier ones) living in Spain. Upon application and acceptance by authorities, such individuals become liable for Spanish taxes based on their Spanish income and assets but avoid such taxes on their non-Spanish income and assets.
Background.
Under Spanish tax law, individuals who spend 183 days or more during a tax year in Spain are normally deemed tax resident. Temporary absences are ignored when determining residency unless a person can prove that he is habitually resident in another country. Thus, footballers coming to Spain would automatically become Spanish tax resident on the day count rule (over 183 days) and, as Spanish residents, would have been liable to Spanish tax on their worldwide income and assets.
However, the Royal Decree 687/2005 modifies this law with respect to wealthy foreign workers. To ease the tax burden and to attract the likes of Beckham and top executives, the government introduced amendments to the definition of tax residency.
On June 10th, 2005, the Spanish government approved Royal Decree 687/2005 implementing the Personal Income Tax regulations in relation to article 9.5 of the Spanish PIT Law. The "Beckham law", as it is commonly known, regulates the procedure that applies to the new Spanish tax regime for expatriates in force since January 1, 2004.
The change of legislation allows an individual who has relocated from another country to Spain the choice of being taxed as a Spanish resident or as a non-Spanish resident. The choice applies in the year of arrival in Spain and continues for the following five years. By electing to be non resident, an individual can limit their liabilities to Spanish taxation to apply to Spanish income and assets only and hence exclude their worldwide income and assets. Thus under the Spanish Non-Resident Income Tax rules they may avoid tax on their worldwide income for a period of up to six tax years provided certain conditions are met.
Should such an election be made, the expatriate will be subject to Spanish taxes on their Spanish source income and on their assets located or exercisable in Spanish territory, calculated at a flat 24.75% tax rate on their salary income (the tax rate was increased from 24% to 24.75% in January 2012). This is instead of being taxed on the progressive tax scale for resident individuals (ranging from 24% up to 43%) during the year of becoming tax resident in Spain and for the following five consecutive years. Note that under this option the taxpayer gets no personal allowances or other deductions from gross income (e.g. for mortgage costs) and thus for lower earners it does not always result in a lower tax burden.
In November 2009 it was reported that the law was under review, and foreigners entering Spain after 1 Jan 2010 would not be able to benefit in the same way as previously.
Conditions.
A person cannot invoke the Beckham law if he resided in Spain in the previous 10 years prior to settling in Spain.
He must have relocated to Spain to take up employment under a contract.
Employment duties must be carried out in Spain, although working outside of Spain up to 15% of the time is permitted.
The employer must either be a Spanish company or Spanish entity or if not Spanish resident then the employer must operate through a permanent establishment in Spain.
The income derived from the employment is not deemed exempt under Spanish income tax law.
Sources.
http://www.cuatrecasas.com/web/es-ESN/PDF/tax_notes_governmen_considering.pdf