He was appointed military governor of Paris by the Minister of War, General Jean-Baptiste Bernadotte on 5 July 1799, replacing General Barthélemy Joubert at the head of the 17th Military Division stationed in Paris. After General Napoleon Bonaparte's return from the Egyptian campaign, he opposed the planned "coup d'état", which was to overthrow the government of the Directory and replace it with a more autocratic Consulate. Its authors, led by Director Emmanuel Sieyès, and eventually joined by General Bonaparte, knew that they needed the support of the armed forces in Paris to pursue their scheme. Fearing its current commander's attachment to republican ideals, they offered him a new position in the leadership of the Army of Italy, which he accepted. After his resignation, the more favourable General François Lefebvre succeeded him as military governor of Paris.