Below are details of the general procedure
Who can apply for it?
Spanish emigrants and their children of Spanish nationality who return to Spain.
When does it have to be submitted?
At any time following the date of return, or the date of death in the case of family members.
What formalities are involved?
They should submit Form TA-0040.
Where is it processed?
In the Provincial Department of the Social Security Treasury General or Administration corresponding to the address of the applicant.
Through the e-Office, if you have a digital certificate.