underwent several extensions over the course of this period, and was occupied by 43 viceroys before the last, José de la Serna, was forced out in 1821. The building was damaged by an earthquake on 20 October 1687, and again in 1746. Antonio de Ulloa described the building as it was at the time of his arrival in Lima as a young Lieutenant of the Spanish Navy in 1740: In the north side of the square is the vice-roy's palace, in which are the several courts of justice, together with the offices of revenue, and the state prison. This was formerly a very remarkable building, both with regard to its largeness and architecture, but the greatest part of it being thrown down by the dreadful earthquake with which the city was visited, Oct. 20th, 1687, it now consists only of some of the lower apartments erected on a , and is used as the residence of the vice-roy and his family. General José de San Martín declared the Independence of Peru from the Palace on 28 July 1821. Republican period The Government Palace has served as the seat of government of all presidents of the Republic of Peru since the Viceroyalty came to an end. Fire gutted the building in December 1884, during the presidency of General Miguel Iglesias, and it had to be rebuilt. In 1921, fire again destroyed much of building. The then President, Augusto B. Leguía, ordered its reconstruction and, in modifying the facade, launched the building of the present Government Palace. Work began in 1926. The first phase was designed by French architect Claude Antoine Sahut Laurent (1883–1932). Construction came to a halt with his death in 1932. Phase II was built between 1937 and 1938 during the presidency of Oscar R. Benavides, who assigned completion of the building to Polish architect Ricardo de Jaxa Malachowski. Work began on 24 August 1937 with the demolition of the older structure, including what remained of Pizzaro's original adobe building. The project was completed the following year, when the new Government Palace was officially inaugurated. On 28 July 2021, during his inauguration, President Pedro Castillo announced that he will not govern from the palace and that the palace will be handed over to the Ministry of Cultures and turned into a museum of Peruvian history. Palace Guard Viceregal Period When the Viceroyalty was established, the Viceregal Palace Guards were