Article 321 [source]

Spanish Criminal Code
English translation

Those who demolish or seriously alter buildings that are uniquely protected due to their historical, artistic, cultural, or monumental value will be punished with imprisonment for six months to three years, a fine of twelve to twenty-four months, and, in all cases, special disqualification from practicing their profession or trade for a period of one to five years.

In any case, the Judges or Courts, with due justification, may order the reconstruction or restoration of the work at the expense of the perpetrator, without prejudice to any compensation owed to third parties acting in good faith.