The town of Loreto, just south of Ancona in the region of the Marches, was the site of a famous shrine known as the Holy House of Loreto which, during the sixteenth century, was encased in beautiful marble facades designed by Bramante and others. The ancient wooden statue of the Madonna which was housed inside this structure was, however, the real attraction, and pilgrims travelled from far and wide, barefoot, in order to worship before her. The statue is said to have come alive on certain occasions, and it seems as if Caravaggio attempted to render this miracle by lending a certain stiffness and artificiality to the pose of his otherwise palpably alive model. The work was commissioned by the Bolognese Cavalletti family at the instigation of Ermes Cavalletti who, in 1602, had bequeathed money for the purchase of the first chapel on the left in the Church of Sant' Agostino and for its decoration with an image of the Madonna of Loreto. Caravaggio's picture was criticized by later seventeenth-century critics for its disrespectful and indecorous treatment of a holy theme, all the more so because it became such a popular devotional image among the poor. The old man with dirty feet was singled out for special attack. But one should not deduce from this that it was frowned on by the connoisseurs of the time.
Its appeal for the populace may not have been completely unrelated to the long-standing popularity of the Church of Sant' Agostino itself, which held a special place in the life of Renaissance Rome, when it was patronized by many of the great humanists and courtesans. It seems to have attracted in the sixteenth century an additional stream of visitors to see Andrea Sansovino's touching sculpture of St. Anne with the Virgin and Child (1512).