He was succeeded as President by Diego Martínez Barrio, who had been Prime Minister in 1936. Following the Occupation of France, the government was reconstituted in Mexico, which under the left-wing President Lázaro Cárdenas continued to recognise the Republic, although Negrín spent the war years in London. Negrín resigned as Prime Minister in 1945 and was succeeded by José Giral.