The public market was built at the end of the 18th century. The government of San Lorenzo de El Escorial built its last great construction for the residents of the town that consisted of a “Large house for the storage of wines, grocery articles, fish, bacon, and other branches and rooms”.
In 1797, the town centre of San Lorenzo was already full, which made it impossible to find a free centrally-located site to construct the building, so the space occupied at that time by the “Veeduría” (Inspector’s Office) was chosen.
The project was given to Juan de Villanueva and construction took place between 1797 and 1806. The main façade is outstanding and made with granite ashlars, the entrance is through a large central arch and arcades make up the interior patio.
Due to the increase in the number of students at the elementary school for the royals retinue located in the Casa de los Soportales (House of the Porches) from 1794, the governor proposed transferring to this building, and in 1806 Juan de Villanueva was entrusted with adding another floor which could be accessed from calle Francisco Muñoz.
The building continued to be used for both education and commerce until 1873, when the poor condition the building was in made the town hall invite tenders for its restoration. This restoration work, which led to the interior patio being covered, led to the building becoming appreciated for its commodiousness.
During the Civil War, it was abandoned, the building becoming damaged and losing the glass on its upper floor.
In 1949, the Mayor of San Lorenzo de El Escorial requested that certain work be done to prevent the roof collapsing. This time, the glassed-in roof was restored by means of a skylight, the second floor was closed in by means of the current gallery and a “T”-shaped staircase was added between the first two floors. A little later, the new skylight fell after a great snowfall.
One of the most significant repairs was carried out in 1967, once again due to the risk of the roof collapsing. At that time, the street Calle del Repeso, located between the Market and the Cuartel de Invalidos, was covered over, meeting the need at that time for a shopping area.