in the food provision of Málaga. The economic fabric of the city shifted from a borderland military-focused economy to the strengthening of the agricultural role in the early 16th century. Antequera became an important commercial town at the crossroads between Málaga to the south, Granada to the east, Córdoba to the north, and Seville to the west. Because of its location, its flourishing agriculture, and the work of its craftsmen, all contributing to the cultural growth of the city, Antequera was called the "Heart of Andalusia" by the early sixteenth century. During this time the townscape also changed. Mosques and houses were torn down, and new churches and houses built in their place. The oldest church in Antequera, the late Gothic Iglesia San Francisco, was built around the year 1500. In 1504, the humanist university of the Real Colegiata de Santa María la Mayor was founded; it became a meeting place for important writers and scholars of the Spanish Renaissance. A school of poets arose during the sixteenth century that included Pedro Espinosa, Luis Martín de la Plaza, and Cristobalina Fernández de Alarcón. A school of sculpture produced artists who were employed mainly on the many churches built, and who were in demand in Seville, Málaga and Córdoba and the surrounding areas. The newly built churches included San Sebastián in the city centre and the largest and most splendid of the city, Real Colegiata de Santa María, with its richly decorated mannerist façade. Still more churches and convents were built into the eighteenth century (today there are 32 in the city altogether), as were palaces for the members of the aristocracy and the wealthier citizens, in the Spanish Baroque style. Antequera's prosperity slowly came to a close at the end of the seventeenth century and the beginning of the eighteenth. Spain had to accept the loss of its American colonies and lost a number of crucial military conflicts in Europe. That led to a deep economic crisis, which in some parts of the country, led people to turn to bartering. Church, aristocracy, and the upper middle class — the great landowners — who had been the clients and sponsors of the creative arts, lost most of their fortunes and could not afford to build more churches or palaces. Late modern history Starting from the mid-eighteenth century, Spain underwent a series of reforms, in particular a land reform and the reduction