Article 447 [source]

Spanish Criminal Code
English translation

The Judge or Magistrate who, through serious negligence or inexcusable ignorance, issues a manifestly unjust sentence or resolution, shall incur the penalty of special disqualification from employment or public office for a period of two to six years.