During the Middle Ages, the city of Madrid did not have a building that performed the functions of a town hall, as these matters were discussed under the portico of the disappeared Church of El Salvador, which was located in front of this square. It was not until the reign of Philip III, between the years 1645 and 1693, when the Master Mayor of the Villa and Chief Architect of the Royal Works, Juan Gómez de Mora, built the current town hall. This Casa de la Villa was in operation until 2007, when the functions of the town hall were transferred to the Telecommunications Palace, the beautiful building designed by Antonio Palacios in the popular Plaza de Cibeles.