Let me share the best investment I ever made! It may be still available to many of you.
If you've paid into the UK DHSS for some years and then moved to Spain you don't need to lose all or even any of your contributions as you can make voluntary payments until you are 65 to top up to a full UK pension. Take my example - my first 10 working years were with UK companies who paid my Social Security then the next 30 I worked overseas and paid the DHSS myself. I paid it once a year at a much reduced rate. For example in my last year (at 64) I paid in £360 but in my first retirement month (at 65) I received back £386. This has continued each month (plus inflation) and still does. By the time I was 67 and a bit I'd broken even and ever since I've been in pure profit.

If you're moving back to the UK, or have friends that already have, an EU convention also applies in reverse. You can top up your existing Spanish contributions voluntarily even if just to hit the minimum 15 years to collect a pension. Obviously the more years the more you receive.

If you can claim both a UK and a Spanish pension your retirement may be well protected. Remember when doing your calculations that the basic Spanish pension is almost double the UK one.

This convention applies between all EU countries
Mike Lillico
Playa de Palma