Article 405 [source]

Spanish Criminal Code
English translation

Any public authority or official who, in the exercise of their competence, knowing it to be illegal, proposes, appoints or gives possession to any person for the exercise of a certain public office without the legally established requirements being met, shall be punished with a fine of three to eight months and suspension from employment or public office for a period of one to three years.