During the 18th century the textile industry declined, especially when Carlos IV forbade this activity in Cuenca in order to prevent competition with the Real Fábrica de Tapices (Royal Tapestry Factory), and Cuenca's economy declined, thus losing population dramatically (5,000 inhabitants).