Leonardo da Vinci's dramatic Last Supper in the former refectory of Santa Maria delle Grazie in Milan is the largest of his paintings – it covers over 40 sq m of the refectory's north wall – and many think it his greatest. It would probably be called the most famous painting in the world if that unverifiable accolade had not already been accorded to a certain moody portrait of a Florentine housewife, which he also did. It took him and his team of assistants about three years to complete. No contract for it survives, but it was almost certainly commissioned by his patron, Lodovico Sforza, in 1494, and we know he was still at work on it in 1497 because an entry in the monastery accounts records a payment to some workmen for repairing "a window in the refectory where Leonardo is painting the Apostles". Numerous sketches, notes and preparatory drawings chart the long and sometimes troubled gestation of "this restless masterpiece" (as Jacob Burckhardt described it), and the latest restoration, completed in 1999, has revealed a wealth of information about the techniques Leonardo used.
One important technical fact that has been known for centuries is that The Last Supper was not painted using traditional fresco technique (watercolour and egg-tempera on moist plaster) but with an experimental oil-based medium. The chief advantage of this was compositional – oils gave him the subtle tonalities that were his trademark, and the opportunity to rethink and rework as he went along – but in practical terms it was a disaster. On a wall prone to damp, the paint surface quickly deteriorated. By 1517, a diarist noted, it was already "beginning to spoil", and by the time Giorgio Vasari saw it in the 1550s there was little more than a "muddle of blots". For centuries it was subjected to invasive restorations and heavy-handed retouchings. It suffered further vicissitides in the early 19th century, when Napoleon's soldiers used the refectory as a stable, and in 1943, when an RAF bomb landed on the Grazie, leaving the mural exposed to the elements for several months. To the inherent charisma of the painting is added this chequered history of self-inflicted fragility and semi-miraculous survival.
The story of Leonardo's creation of the work has now found an ideal chronicler in Ross King, author of Brunelleschi's Dome and Michelangelo and the Pope's Ceiling, which have won plaudits for their concise, close-focus study of great renaissance achievements. King has the gift of clear, unpretentious exposition, and an instinctive narrative flair. Here he cross-cuts between the political tensions of 1490s Milan – with expansionist threats from France culminating in the invasion of 1499 – and the dogged concentration of Leonardo at the Grazie. He ferrets through various aspects of the mural and its composition – the "secret recipes" of paints and glazes; the complex geometry of the perspective, which makes the fictive space seem like an actual annex of the refectory; the wave-like formation of agitated apostles' heads as they react to Christ's announcement of impending betrayal; the eerie exactitide of the vanishing point, marked by a nail-hole just visible on the paint surface around Christ's right temple.
Wonderful details have been recovered by the restorers – the food on the table includes not just the beakers of wine and crusts of bread of traditional Last Supper iconography, but a wholly unexpected platter of sliced eel garnished with pieces of orange. This cues in a brief but informative foray into the popularity of eel in renaissance cuisine, though King has missed a more personal note, which is a pungent menu of "eels, apricots and peppered bread" found, in the form of a shopping list, among Leonardo's papers.
There is also some evidence about the models Leonardo used. In a little notebook we learn that a certain Alessandro Carissimo from Parma was the model for Christ's hand. A jotting in the same notebook reads "crissto: giovan conte", which probably gives us the name of the model for Christ. This is curious in that the most plausible Giovanni Conte so far discovered was a soldier in the militia of Ascanio Sforza, and later (like Leonardo) in the service of the warlord Cesare Borgia, so it seems that most serene and poignant of faces is actually that of a military man. The Dan Brown theory, that the figure immedately to the left of Christ represents Mary Magdalene, is given short shrift. It is obviously a dreamily effeminate St John, the disciple "whom Jesus loved" and who "leaned on Jesus' bosom": he is, as King says, another of those "hypnotic androgynes" (like the angel in the Virgin of the Rocks and the Louvre John the Baptist) who add a homoerotic tremor to Leonardo's treatment of sacred subjects.
King's most adventurous claim in this area is that St James the Less (the second apostle from the left) is a self-portrait. He is shown in profile, and compares quite well with the red-chalk profile portrait of Leonardo by Francesco Melzi. But that was done at least 12 years after The Last Supper was finished. (A probable portrait much closer in time is in the the remaining fragments of a fresco by Leonardo's friend Donato Bramante, painted in Milan in the 1490s.) This apostolic self-portrait remains an intriguing possibility, nonetheless: more food for thought from a book that offers an engaging and unusually intimate view of one of the great icons of western art.
• Charles Nicholl's Leonardo da Vinci: The Flights of the Mind is published by Penguin.