After the February 1848 Revolution and the establishment of the Republic, Cavaignac received the promotion to general of division and was appointed Governor General of Algeria by the French provisional government, succeeding the Duke of Aumale. On 20 March he was offered the post of Minister of War, but refused it in a letter addressed to the provisional government, written from Algiers on 27 March. About a month later, Cavaignac left Algeria to take his seat as a representative of Lot in the constituent National Assembly, after being the most voted in that department on the 1848 legislative election.