The castle is infamous in Catalan history books because of its role in the civil war from 1936 to 1939 when both sides of the conflict imprisoned, tortured and shot political prisoners at Montjuïc, among them Lluís Companys, who was the president of the Generalitat of Catalonia during the Spanish Civil War. Companys was executed upon orders from the Spanish State at Montjuïc Castle in 1940.