The U.S. occupied the Dominican Republic (1916–1924) due to threats of defaulting on foreign debts; a subsequent calm and prosperous six-year period under Horacio Vásquez followed. From 1930 the dictatorship of Rafael Leónidas Trujillo ruled until his assassination in 1961. Juan Bosch was elected president in 1962 but was deposed in a U.S.-backed military coup in 1963. A civil war in 1965, the country's last, was ended by U.S. military occupation and was followed by the authoritarian rule of Joaquín Balaguer (1966–1978 and 1986–1996). Since 1978, the Dominican Republic has moved toward representative democracy, and has been led by Leonel Fernández for most of the time after 1996. Danilo Medina succeeded Fernández in 2012, winning 51% of the electoral vote over his opponent ex-president Hipólito Mejía. He was later succeeded by Luis Abinader in the 2020 presidential election.