Article 388 [source]

Spanish Criminal Code
English translation

A sentence handed down by a foreign court for a crime of the same nature as those included in this chapter shall be treated as equivalent to sentences handed down by Spanish judges or courts for the purposes of recidivism, unless the criminal record has been cancelled or could be cancelled under Spanish law.