Just after the proclamation of the Second Spanish Republic in April 1931, he became Mayor of Sant Just Desvern on 15 April having won the election for a local list named Esquerra Catalana against a list related to the Regionalist League of Catalonia. He also won the elections of January 1934 this time with a list named National Front against the Republican Left of Catalonia. After the Events of 6 October 1934, he was detained by the Civil Guard (a Spanish rural police force) in Ponts (West Catalonia) and sent to prison in Lleida (West Catalonia main city). The Spanish government ordered him to be transferred to Madrid but amid confusion he escaped. He went into exile to France after receiving te condition of political refugee in Brussels. After the victory for the Popular Front in the elections of 1936, he returned to Sant Just Desvern and retook office in February 1936.