In 1512, the Sforza family regained control of Milan. Ludovico Sforza was long dead, and the ruler Maximilian had taken his place. With his patron defeated, Leonardo decided to go to Rome, where Leo X, a Medici, was now pope. He went there at the behest of Giuliano de Medici, the pope's brother and commander of the papal troops. He and his pupils Salai and Melzi resided in apartments in the Belvedere, a villa inside the walls of the Vatican.
During these three years in Rome, Leonardo pursued architecture, hydraulics, and the dynamics of mirrors. At this time, the Medici empire's fortune depended largely on the dye industry, and Leonardo attempted to fashion a parabolic solar reflector that would speed the boiling process essential to the making of dyes.
And although he was also at work on various architectural projects as well, Leonardo appears to have been bored–at least, Vasari implies that he was. According to Vasari, Leonardo had to amuse himself with pranks. He had always been given to writing riddles, but, if Vasari is to be believed, he now did things like permanently attaching bird wings to a lizard, and inflating a pig's intestine so that it filled a room.
Leonardo's notebooks from this time depict several apocalyptic visions, usually associated with a deluge reminiscent of the biblical flood. They also contain are also many illustrations, as above, which combine Leonardo's artistic skills with his interest in hydraulics.
It was probably at this time that Leonardo drew the above self-portrait. It shows an old man, with the long beard and haggard look we have come to associate with Leonardo. It should be noted that, if this is indeed a self-portrait, as most critics agree, it is remarkable that it is drawn from an angle, not head on: Leonardo probably arranged a complex system of mirrors in order to draw himself from this angle.
While in Rome, Leonardo completed his last major painting, Saint John the Baptist. Although it was his last, it is also one of his least famous paintings. John's androgynous look has upset prudish critics for centuries, and no one can deny that the figure is not anatomically correct. Paradoxically, Leonardo often got anatomy completely wrong in his paintings, even as he was making perfect anatomical sketches in his notebooks; perhaps he was drawing a distinction between science and art. Other critics complain that Leonardo has boringly recycled here the upward-pointing finger and the smile of Mona Lisa.
In 1515, Leonardo probably traveled to Bologna, to attend the peace talks between the Pope and the new king of France, Francis I. Upon attaining the throne, Francis I had conquered Milan, and the Medici family was eager to make him an ally. As a peace offering, Leonardo constructed a mechanical lion, symbolizing Florence: the lion was able to walk a few paces, and then a trapdoor in his chest opened up to reveal a fleur-de-lis, symbol of France. The new King was impressed.
Leonardo was probably not very happy in Rome. Although Giuliano de Medici held Leonardo in high esteem, it is not clear whether the pope or his court granted him much appreciation. After all, they seemingly believed the ridiculous claims of a mere engineering assistant, that Leonardo was interested in necromancy, or the conjuring of the recently dead. Moreover, the pope may have had greater interest in other artists in Rome at the time, such as Michelangelo.
This period, like those before it, again sees Leonardo at a remarkable level of productivity. He was a consultant in numerous architectural and hydraulic projects. By this time, he was about sixty years old, yet he was full of pranks and was ready to study things that he had never seriously approached before, such as the properties of mirrors.