The Registro Civil or Civil Registry is a public registry whose purpose is to officially record information about civil status of persons. Information recorded is, for example, name and surname, birth, death, filiation, sex or nationality.
The Registry was started in Spain in 1870. It is overseen by the Dirección General de los Registros y del Notariado (General Directorate of Registries and Notaries) and is part of the Ministry of Justice.
It is the competent authority for events that occur to Spaniards or events that occur in Spain. It is also valid for events that occur abroad when their registration serves as the basis for a subsequent one required by Spanish law.
Municipal registries have jurisdiction within the municipal district. The municipal offices are competent for events related to marriage, birth, death. These are registered in the municipal registry of the place where the events occur. However, it is possible that the birth of a child is registered in the municipality of the home of the parents.
Municipal registry office may be located at the Town Hall or at the court house of Juez de 1ª Instancia
Consular registries outside Spain have jurisdiction for Spaniards in their area and are competent for events related to marriage, birth, death. They record events on behalf of the Registro Civil Central. Central Civil Registry which is the place to obtain duplicates of consular registrations.
Additionally anything that cannot be registered in the local Civil Registry due to exceptional circumstances may be registered in the Central Civil Registry
More info in Spanish on this Ministry of Justice page.