When McKinley became president, Cuba was still a Spanish colony, but Cubans desperately wanted their independence. Many Americans lived in Cuba, so when riots broke out, McKinley sent the battleship U.S.S. Maine to Havana to protect the Americans and their property. Three weeks later the Maine exploded and sank in Havana Harbor. Even though the U.S. Navy reported that it was an accident, America declared war on Spain and the Spanish-American War began.