The victory of the Popular Front in the 1936 Spanish general election caused him to be pardoned and released, being readmitted to the army. With the Generalitat restored, he regained his position at the head of the Mossos and was one of the officers who contributed to quelling the July 1936 military uprising in Barcelona, when he directed the attack on the headquarters of the Captaincy General of Catalunya and arrested Manuel Goded, leader of the military rebellion in Barcelona.