The social security scheme is subject to the national legislation of each individual country. In the EU, the EEA, and Switzerland, the national social security scheme of individual member countries are not harmonised, but merely coordinated. In some cases, coordination replaces national rules that are disadvantageous for migrating citizens. The principles of posting of employees and self-employed persons who are EU citizens to another EU country are governed by Regulation (EC) No 883/2004 of the European Parliament and of the Council of 29 April 2004 on the coordination of social security schemes.
In countries outside the EU, the EEA, and Switzerland, social security schemes are mostly regulated by international social security agreements, which usually have the form of bilateral agreements between two countries. The main purpose of the international agreements is to coordinate the social security schemes of the signatories and safeguard the individuals’ entitlement to social security benefits as people travel across countries, whether for tourism or employment reasons. At the same time, these agreements focus on describing the principle of accumulation of the periods of insurance in individual countries.