Only in 1842 was it transferred to the present building, near São Lázaro’s garden. Today, in the library main reading room, there is a portrait of Dom Pedro IV, painted by João Batista Ribeiro.
But before housing the city library, this building was a hospice (in 1780) and later a convent – Santo António da Cidade (Saint Anthony of the City) –, in 1790. In 1831 the monks abandoned the place and the city took possession of the building, allowing British troops to occupy it, as allies of the Liberal faction in the civil war.