In 1796 French Republican troops under the command of Napoleon Bonaparte invaded Italy and defeated the papal troops. The French occupied Ancona and Loreto. Pius VI sued for peace which was granted at Tolentino on 19 February 1797; but on 28 December 1797, in a riot blamed by papal forces on some Italian and French revolutionists, the popular brigadier-general Mathurin-Léonard Duphot, who had gone to Rome with Joseph Bonaparte as part of the French embassy, was killed and a new pretext was furnished for invasion.