Article 61 [source]

Spanish Criminal Code
English translation

When the law establishes a penalty, it is understood that it imposes it on the perpetrators of the completed offense.