Article 3 [source]

Spanish Criminal Code
English translation

1. No penalty or security measure may be executed except by virtue of a final judgment rendered by the competent Judge or Court, in accordance with procedural law.

2. Nor may any penalty or security measure be executed in any manner other than that prescribed by law and its implementing regulations, nor under any circumstances or conditions other than those expressly stated therein. The execution of the penalty or security measure shall be carried out under the supervision of the competent Judges and Courts.