Following the fall of the Republic in April 1939, the
president of Spain,
Manuel Azaña and the
prime minister,
Juan Negrín, went into exile in
France. Azaña resigned his post and died in November 1940. He was succeeded as president by
Diego Martínez Barrio, who had been prime minister in 1936. Following the
German occupation of France in 1940, 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
World War II years in
London. Negrín resigned as prime minister in 1945 and was succeeded by
José Giral. Until 1945, the exiled Republicans had high hopes that at the end of World War II in Europe,
Franco's regime would be removed from power by the victorious
Allies and that they would be able to return to Spain. Furthermore, the newly-established
United Nations would pass a resolution condemning the Francoist regime and the exiled Republicans initially worked with the Allies. When these hopes were disappointed, the government-in-exile faded away to a purely symbolic role. The government moved back to Paris in 1946. There was also a Basque government-in-exile and a Catalan government-in-exile. In the immediate postwar period, it had diplomatic relations with
Mexico,
Panama,
Guatemala,
Venezuela,
Poland,
Czechoslovakia,
Hungary,
Yugoslavia,
Romania, and
Albania, but the
United States, the
United Kingdom,
France and the
Soviet Union did not recognise it. Following Franco's death in 1975, King
Juan Carlos initiated a
transition to democracy. In 1977, the exiled Republicans accepted the re-establishment of the monarchy and recognised Juan Carlos's government as the legitimate government of Spain. The key moment came when socialist leaders
Felipe González and
Javier Solana met Juan Carlos at
Zarzuela Palace in Madrid — a tacit endorsement of the monarchy by the previously staunchly republican Socialists. On 1 July 1977, the Government of the Spanish Republic was formally dissolved. In a gesture of reconciliation, Juan Carlos received the exiled leaders at a ceremony in Madrid. == Presidents in exile ==