In June 1919 Galarza became a member of the Madrid Socialist Association which was attached to the Spanish Socialist Workers' Party.  In 1920 he began to work for the newspaper El Sol and later, for La Voz. Galarza joined the freemason organization in Madrid in 1928. Next year he was arrested for his participation in the opposition movement in Murcia against the dictatorship of Miguel Primo de Rivera. In the prison he met with Marcelino Domingo, Álvaro de Albornoz and Benito Artigas, with whom he established the Radical Socialist Republican Party in 1929. Due to his participation in the pro-republican movement in December 1930 he was again arrested and released in April 1931. He was elected as a deputy representing the Zamora province in June 1931 for the Radical Socialist Republican Party. When a provisional government was established during the Second Republic he was appointed first prosecutor of the Supreme Court and then, director general of security. Later he was named as the undersecretary of the minister of communications which he held between December 1931 and January 1933. During this period he launched two newspapers in Zamora, La Mañana and La Tarde.