Leonardo began painting Mona Lisa in 1503 or 1504 in Florence, working occasionally on the piece for four years, before moving to France. He worked intermittently on the painting for another three years, finishing it shortly before he died in 1519. Most likely through the heirs of Leonardo's assistant Salai, the king bought the painting for 4,000 ecus and kept it at Chateau Fontainebleau, where it remained until given to Louis XIV, who moved it to the Palace of Versailles. After the French Revolution, it was relocated to the Louvre. Napoleon I had the portrait moved to his personal bedroom in the Tuileries Palace, but it was later returned to the Louvre.