The palace was the home of the government of the Republic of Venice until the Napoleonic occupation of the city in 1797. Venice was ruled by the French, then Austria, and in 1866 it became part of Italy. During this time, the palace was used for various government offices, the Biblioteca Marciana and other important cultural institutions within the city.