Article 384 [source]

Spanish Criminal Code
English translation

Anyone who drives a motor vehicle or moped after their permit or license has been revoked due to the total loss of legally assigned points will be punished with imprisonment for three to six months, a fine of twelve to twenty-four months, or community service for thirty-one to ninety days.

The same penalty will be imposed on anyone who drives after having been provisionally or permanently deprived of their permit or license by court order, and on anyone who drives a motor vehicle or moped without ever having obtained a driver's permit or license.