After the ruling House of Medici died out, their art collections were given to the city of Florence under the famous Patto di famiglia negotiated by Anna Maria Luisa, the last Medici heiress. The Uffizi is one of the first modern museums. The gallery had been open to visitors by request since the sixteenth century, and in 1765 it was officially opened to the public, formally becoming a museum in 1865.[4]