The Spanish Empire controlled most of Central and South America as well as the Philippines in Asia at the start of the 19th century. However, between 1810 and 1825, inspired by the French Revolution, most of Spain's American colonies gained independence as Spain was weakened from fighting France. In 1898, Spain fought the Spanish-American War against the United States over its remaining colonies of Cuba and Puerto Rico in America and the Philippines in Asia, which it ultimately lost, marking the end of the Spanish Empire.