It has recently been a 4th degree one at Vitoria-Gasteiz, in the North of Spain. One of the least probable places you would even think of have an earthquake...
The updated IGN website doesnt work properly for me. The old site was so much better, do you know if there is an alternative?
Unfortunately Spain and Portugal have seen quite a few earthquakes over the centuries, some of them quite deadly:
https://en.wikipedia.org/wiki/List_of_earthquakes_in_Spain