A study for the picture commissioned by the Fraternity of San Giovanni Battista dei Fiorentini for their church in Bologna, installed on 31 August 1777, P. Bagni, I Gandolfi, Milan, 1992, no. 174. Following the suppression of the Fraternity by Napoleon in 1798, the canvas was removed to the former convent of San Vitale. It was only installed in its present position in the Church of Santa Maria della Misericordia to replace an altarpiece by Francia which was requisitioned by the French during their occupation of Bologna.
Two further studies for the altarpiece are known, in a private collection and in the Galleria di Palazzo Rosso, Genoa (inv. 2333), P. Bagni, op. cit., nos. 176 and 177.