In a landmark decision, the European Court of Justice has declared that the Spanish exit tax, at it is currently constructed, is contrary to the EU Treaty.
However, the Court takes that view that Spain could preserve its powers in taxation matters by means of measures which are less harmful to the freedom of establishment. It is possible, for example, to request payment of the tax debt following the transfer, at the point at which the capital gains would have been taxed if the company had not made that transfer outside of Spanish territory. Thus, the right to the freedom of establishment does not preclude capital gains generated in a territory from being taxed, even if they have not yet been realised. By contrast, it does preclude a requirement that tax be paid immediately.