After the foreign troops left, many dictators ruled the country. During World War I, Cuba sided with the Allies. In the 1930s, Fulgencio Batista seized power and became president in 1940. The dictator's rule was overthrown by the Cuban Revolution, which brought an armed opposition to power in 1959, grouped in the 26th of July Movement and the Insurgent Army.