During the early 20th century, Spain was unhappy with the monarchy due to losses of colonies and wars. This led to a coup in 1923 where Primo de Rivera became dictator and banned political parties. In 1931, the Second Spanish Republic was proclaimed, establishing reforms like women's suffrage. However, a civil war broke out in 1936 between Republican and Nationalist groups, led by Francisco Franco. Franco emerged victorious in 1939 and established a dictatorship until his death in 1975, repressing opposition and restricting freedoms for several decades.