Article 529 [source]

Spanish Criminal Code
English translation

1. Any judge or magistrate who hands over a criminal case to another authority or official, military or administrative, who illegally requests it, shall be punished with special disqualification from public employment or office for a period of six months to two years.

2. If, in addition, the judge or magistrate hands over the person of a detainee, the penalty shall be increased.