As well as being the ducal residence, the palace housed political institutions of the Republic of Venice until the Napoleonic occupation of the city in 1797, when its role inevitably changed. Venice was subjected first to French rule, then to Austrian, and finally in 1866 it became part of Italy. Over this period, the palace was occupied by various administrative offices as well as housing the Biblioteca Marciana and other important cultural institutions within the city.
By the end of the 19th century, the structure was showing clear signs of decay, and the Italian government set aside significant funds for its restoration and all public offices were moved elsewhere, with the exception of the State Office for the Protection of Historical Monuments, which is still housed at the palace's loggia floor. In 1923, the Italian State, owner of the building, entrusted the management to the Venetian municipality to be run as a museum. Since 1996, the Doge's Palace has been part of the Venetian museums network, which has been under the management of the Fondazione Musei Civici di Venezia since 2008.