You may not be aware, but claiming UK benefits in Spain is a very real possibility for some UK ex-pats in certain circumstances.
For example, if you are claiming jobseeker's allowance, a pension or certain other benefits when you leave the UK, you may still be able to get your benefits allowance transferred across to Spain.
The Department for Work and Pensions has a detailed website with more details. However, if you leave a job in the UK in order to move to Spain, you will NOT be able to claim any benefits.
If you are planning to live in Spain long term you should contact the DSS overseas department in order to get your UK NI contributions transferred to the Spanish system.
If you are planning a move to Spain or already live in Spain and are concerned what your entitlement to benefits in the UK may be, you can click here to decide Whether to make voluntary National Insurance contributions to the UK..