Article 121 [source]

Spanish Criminal Code
English translation

The State, the Autonomous Community, the province, the island, the municipality, and other public entities, as applicable, are subsidiarily liable for damages caused by those criminally responsible for intentional or negligent offenses, when such persons are authorities, agents, or contractors thereof, or public officials acting in the performance of their duties or functions, provided that the injury is a direct consequence of the operation of the public services entrusted to them. This is without prejudice to the patrimonial liability arising from the normal or abnormal operation of said services, enforceable in accordance with the rules of administrative procedure, and in no case may there be a duplication of compensation.

If civil liability is sought in the criminal proceedings against the authorities, their agents, or contractors, or public officials, the claim must be brought simultaneously against the Administration or public entity presumed to be subsidiarily liable.