On April 25 1483 Leonardo and the brothers Ambrogio and Evangelista de Predis were commissioned by the Milanese Confraternity of the Immaculate Conception to paint a work celebrating the Immaculate Conception for their new chapel. The contract survives, as does much of the documentation from the later disputes over it. There had already been a previous contract in 1480 with Giacomo del Maino, which had evidently not been completed; among the work stipulated in the second contract was the completion and gilding of various carvings for the wooden framework of the altarpiece (none known to survive). Three paintings were stipulated, a central Virgin and Child and two side panels with angels, described only in the earlier contract with del Maino. These panels are also in the National Gallery, with different provenances from the main were painted entirely by the brothers de Predis, according to both modern art historians and a contemporary statement by the brothers in the legal dispute
All the work was to be completed by the Feast of the Conception (December 8) 1483, but this did not happen. At some later date the legal dispute began; the main issue being that the main painting was unfinished, and Leonardo had left Milan. Meanwhile the de Predis brothers had completed their portion of the work, and wanted payment. The dispute was settled on April 27, 1506, with the requirement that should Leonardo return to Milan within two years he should complete the painting, and receive further specified sums beyond those in the original contract. This appears to have happened, as a sum was paid to him in 1507. The surviving documentation casts no light on the existence of two versions, nor does it give any support to claims that the clients were unhappy with the subject or treatment of the paintings. At what point the first version was diverted, or if it was at all, remains unclear, and the subject of many theories. On stylistic grounds some writers, including Martin Davies, feel that 1483 is too late a date for the Louvre version; for the commission Leonardo may have simply repeated a composition he had already produced. Alternatively, the Louvre version may have been painted for the confraternity soon after the commission, and then sold to another buyer.