In 1761 Christoph Willibald Gluck's "Don Juan" was performed. Mozart knew this work. Between 1776 and 1787 seven Don Juan operas were composed, the last of them in 1787 in Venice. It was called "Convitatko de pietra" - "The guest of stone", by Giovanni Gazzaniga (text: Giuseppe Bertati). Lorenzo da Ponte based his libretto on this work, especially the dramatic structure. On comparing the two works, the mussic critic Alfred Einstein has pointed out that da Ponte's language is wittier, more concise and appropriate, the characters are defined more clearly. Mozart seems to have influenced the author of the libretto. The number of characters (10 with Bertati) was reduced to 8, the figure of Donna Anna was developed and turned into Don Giovanni's enemy. In the Venetian story she disappears after the first scene.
Da Ponte wrote his work during the first months of 1787.