Article 508 [source]

Spanish Criminal Code
English translation

1. Any public official or authority who assumes judicial powers or obstructs the execution of a ruling issued by a competent judicial authority shall be punished with imprisonment for six months to one year, a fine of three to eight months, and suspension from public employment or office for one to three years.

2. Any administrative or military official or authority who undermines the independence of judges or magistrates, guaranteed by the Constitution, by issuing them instructions, orders, or injunctions related to cases or proceedings they are handling, shall be punished with imprisonment for one to two years, a fine of four to ten months, and special disqualification from public employment or office for two to six years.