A friend of Leonardo at the time when he was Secretary of the Florentine Republic.
They were in close contact during the early years of the 16th century, when Leonardo was in the service of Cesare Borgia, working on the project for deviating the Arno around Pisa as well as on the fortifications of Piombino, and had begun to paint the Battle of Anghiari.
Machiavelli was assigned important missions up to time of the Medici's return to Florence, in 1512. Dismissed from service, he retired to the Villa dell’Albergaccio at Sant’Andrea in Percussina, a village near San Casciano, where he wrote his fundamental political works (The Prince, the Art of Warfare) and theatrical works (La Mandragola, La Clizia). Before his death he returned to hold public office again thanks to the historian Guicciardini and to Pope Clement VII, who offered him the position of director of works for the fortification of the Florentine walls.