Passage: A related process took place in what is now Mexico, Central America, and parts of North America between 1810 and 1821 with the Mexican War of Independence. Independence was achieved in 1821 by a coalition uniting under Agustín de Iturbide and the Army of the Three Guarantees. Unity was maintained for a short period under the First Mexican Empire, but within a decade the region fought against the United States over the border lands (losing bordering lands of California and Texas). Most of the heat was during the official Mexican-American War from 1846 to 1848.In 1898, in the Greater Antilles, the United States won the Spanish–American War and occupied Cuba and Puerto Rico, ending Spanish territorial control in the Americas.

Question: What did the US do to Cuba and Puerto Rico after winning the War?
occupied