In the European Union, there are common rules to manage pension contributions to different countries, making that contributions (even for a short period of time) will not be lost and will contribute to the calculation of your retirement pension.
These rules are stated in the “Regulation (EC) No 883/2004 of the European Parliament and of the Council of 29 April 2004 on the coordination of social security systems” and are also relevant for EEA countries and Switzerland (EEA is the acronym for European Economic Area and includes the 28 countries of the EU plus Iceland, Liechtenstein and Norway).
Retirement pensions application
The application for a retirement pension has to be initiated, either in the country where you last worked or in the country where you are resident. In the latter case the country of residence will forward the file to the country where you last worked, the country that will be responsible for aggregating all the contributions in the different countries of the EU.
As this is in a very long procedure you should start the application at least 6 months before your retirement.
Since retirement age can differ according to the country, you will receive the part of your pension once you reached the legal retirement age in that country. For example, Mario, an Italian citizen, who worked 10 years in Spain, 2 years in Germany and then moved to France for the last 20 years of his career, will start receiving a pension from France at the age of 62 (the legal retirement age in France), but he will not receive the part from Germany and Spain until he is 65 (the legal retirement age in Spain and Germany).
In most of EU countries you have to work for a minimum period of time in order to be eligible to a pension. This period is calculated by aggregating all periods you have been working in a EU country. In the example above, in order to be entitled to a pension in Germany, you have to be working for at least 5 years. Mario will receive a pension from Germany even though he worked there for 2 years because his total period of contribution of 32 years will be taken into account.
In each country where the contributions were made, three amounts will be calculated: the theoretical amount, the pro-rata benefit and the independent benefit.
The theoretical amount, is the pension you would receive if you had worked the total period within the same country. The pro-rata amount is then calculated by multiplying the theoretical amount by the percentage of time contributed in the country. The independent benefit is the amount calculated in the country regardless of contribution in the other countries.
The pension authority of that country will pay the highest pension between the pro-rata amount and the independent benefit.
The State Pension is payable in Spain if you have paid contributions to the UK National Insurance to qualify and you meet the rest of the criteria. You can check your state pension using the following link https://www.tax.service.gov.uk/check-your-state-pension
While the UK remains in the EU there will be no change regarding the rights. You can claim your pension if you are within 4 months of the pension age by contacting the international pension centre.
If you are resident in Spain and your last employment was in the UK, you should make your claim to the Instituto Nacional de la Seguridad Social
You can make the calculations in the following link: https://w6.seg-social.es/autocalculo/inicio.do