The museum’s building was formerly the Royal Hospice of San Fernando, built in 1673. The building was designed by Spanish architect Pedro de Ribera. The museum opened in 1929 as the Museo Municipal (municipal museum). It was closed in 1955 the museum for building reforms, and was not reopened to the public until 1978. In 2007 it was renamed as the Museo de Historia de Madrid.