The city then declined until the arrival of the railway in the 19th century, and with its industrialisation into the 20th century.
Mesto je bilo kratek čas, med 1601 in 1606, pod Filipom III., prestolnica habsburške Španije, preden se je za ta vrnila v Madrid.