The Popular Front (Frente Popular) in Spain's Second Republic was an electoral coalition and pact signed in January 1936 by various left-wing political organisations, instigated by Manuel Azaña for the purpose of contesting that year's election.
The Popular Front included the Spanish Socialist Workers' Party (PSOE), Workers' General Union (UGT), Communist Party of Spain (PCE), the Workers' Party of Marxist Unification (POUM, independent communist) and the republicans: Republican Left (IR), (led by Azaña) and Republican Union Party (UR), led by Diego Martínez Barrio. This pact was supported by Galician (PG) and Catalan nationalists (such as the Esquerra Party), and the anarchist trade union, the Confederación Nacional del Trabajo (CNT). Many anarchists who would later fight alongside Popular Front forces during the Spanish Civil War did not support them in the election, urging abstention instead.
The Joseph Stalin-controlled Comintern had decided in 1935 that, in response to the growth of Fascism, popular fronts allying Communist parties with other anti-Fascist parties including Socialist and even bourgeois parties were advisable. In Spain, it was a coalition between leftist republicans and workers' organizations to defend social reforms of the first government (1931-1933) of the Second Spanish Republic, and liberate the prisoners, political prisoners according with the front propaganda, held since the Asturian October Revolution (1934).
The Popular Front defeated the National Front (a collection of right-wing parties) and won the 1936 election, forming the new Spanish Government. Manuel Azaña was elected President of the Republic on May 1936, but the PSOE didn't join the government because of the opposition of Francisco Largo Caballero.
In July 1936, Francisco Franco and other conservative/monarchist generals instigated a coup d'état which started the Spanish Civil War (1936-1939). The Government dissolved the army in the loyal territory and brought weapons to armed groups organized by the unions (UGT and CNT) and workers' parties (PSOE, PCE, POUM) that had initial success in defeating the Francoist forces in Madrid, Barcelona, Bilbao and Valencia. Ultimately though Franco would defeat the Popular Front forces and rule Spain as a dictatorship until he died in 1975.