Promoted to Marshal of France, he was put in command of the Invasion of Algiers in 1830. However, after the July Revolution, he refused to recognize King Louis-Philippe of France and was sacked. After being involved in a plot against the new government, he fled to Portugal in 1832. He led the army of Dom Miguel in the Liberal Wars, and when the liberals won, he fled to Rome. He accepted another amnesty, this time in 1840, and died in France six years later.