Article 42 TEC

The Council shall, acting in accordance with the procedure referred to in Article 251, adopt such measures in the field of social security as are necessary to provide freedom of movement for workers; to this end, it shall make arrangements to secure for migrant workers and their dependants:
(a) aggregation, for the purpose of acquiring and retaining the right to benefit and of calculating the amount of benefit, of all periods taken into account under the laws of the several countries;
(b) payment of benefits to persons resident in the territories of Member States.

The Council shall act unanimously throughout the procedure referred to in Article 251.