There are two main forms of Spanish car number plates, as the system changed recently.The old system was of the form XX-NNNN-YY (black digits on white plate), where XX is a one- or two-letter code denoting the
province the car was registered in, NNNN is a four digit number to make the plate unique (zeros on the left are shown), and YY is a one- or two-letter code which is incremented by one place after the four digit number reaches 9999 — for example A-9999-Z is followed by A-0000-AA. Older cars may use six digits instead of four and two letters, for example A-741923 (it finished on October 1971 when Madrid near reached the 999 999).
See more at Wikipedia.org...