MacMahon led the main French army in the war against the Germans in 1870. He was trapped and wounded at the Battle of Sedan in September 1870. The army surrendered to the Germans, including MacMahon and Emperor Napoleon III. Thus France lost the war and the Emperor went into exile. After convalescence MacMahon was appointed head of the Versailles Army, which defeated the Paris Commune revolt in May 1871 and set the stage for his political career. MacMahon was a devout conservative Catholic, a traditionalist who despised socialism and strongly distrusted the secular Republicans. He took seriously his duty as the neutral guardian of the Constitution and rejected suggestions of a monarchist "coup d'état". He also refused to meet with Gambetta, the leader of the Republicans. He moved for a parliamentary system in which the assembly selected the ruling government of the Third Republic, but he also insisted on an upper chamber. He later dissolved the Chamber of Deputies, resulting in public outrage and a Republican electoral victory. Soon after MacMahon resigned and retired to private life.