The Virgin of the Rocks (sometimes the Madonna of the Rocks) is the usual title used for both of two different paintings with almost identical compositions, which are at least largely by Leonardo da Vinci. They are in the Louvre, Paris, and the National Gallery, London.
[The second Virgin of the Rocks] is in the National Gallery, London, ascribed to Leonardo da Vinci, probably before 1508. Assistants, perhaps the de Predis brothers, probably painted some parts of the work. It was painted for the chapel of the Confraternity of the Immaculate Conception, in the church of San Francesco Grande in Milan. It was sold by the church, very likely in 1781, and certainly by 1785, when it was bought by Gavin Hamilton, who took it to England. After passing through various collections, it was bought by the National Gallery in 1880.
In June 2005, infra-red reflectogram imaging revealed a previous painting beneath the visible one. This is believed to portray a woman kneeling possibly holding a child with one hand with the other hand outstretched. Some researchers believe that the artist's original intention was to paint an adoration of the infant Jesus. Many other pentimenti are visible under x-ray or infra-red examination.