When he reached Italy in 1798, the Treaty of Campo Formio had been signed on 18 October 1797, and Bonaparte had returned to France; but, under the direction of Berthier, Macdonald occupied Rome in the 1798-1799 Roman Republic, of which he was made governor on 19 November 1798, and then in conjunction with Championnet he defeated General Mack at the Battle of Ferentino, the Battle of Otricoli, the 5 December 1798 Battle of Civita Castellana, and two military affairs, first at Calvi Risorta and then on 3 January 1799 at Capua, and then by 10 January 1799, he had resigned his Office due to disagreements with Championnet. However, despite any differences, the men managed to conquer the 1282-1799 Kingdom of Naples, which then became known as the Parthenopaean Republic.