As a socialist he was imprisoned for life in 1917 for taking part in a general strike, but he was released on his election to Parliament in 1918. After the fall of Primo de Rivera (1930) he joined the government of the Second Republic as Minister for Labour. After this collapsed he was imprisoned again (1934–35) for supporting an abortive rising, but was acquitted and released. He was leader of the Popular Front, which won the elections of February 1936, but did not become Prime Minister until September 1936, two months after the outbreak of the Spanish Civil War, when he headed a coalition of socialists, republicans, and communists. He resigned following a communist take‐over in Barcelona in May 1937.