Built as a Nasrid “alhóndiga” (grain exchange) in the 14th century, the building suffered severe deterioration until it was acquired by the State in 1933 and restored by Leopoldo Torres Balbás. In 1985 the Department of Culture of the Junta de Andalucía undertook an important rehabilitation project under the direction of the architect Rafael Soler Márquez, which consisted mainly of the consolidation and waterproofing of walls, restoration of pillars in degraded areas and replacement of deteriorated flooring.