In 1790,the Corregidor Francisco de Almada e Mendonca gave the order to built this building in order to be uses as Casa Pia.It was executed by the architect Teodoro de Sousa Maldonado with assistance of Francisco de Paiva. It was used for several aims.Itw was used as prison for the military criminals before 1832.
It was laso the Seat of the Treasury Department, headquarters,electronic telegraph station.
Although it was a big building it wasn't enough to hold so many quarters.A third floor was necessary but the walls couldn't stand it.The arch of the Porta del Sol was demolished and the building was extended to the west.


