Passage: In September 1901, William McKinley was at the height of his power as president. Elected in 1896, during the serious economic depression resulting from the Panic of 1893, he had defeated his Democratic rival, William Jennings Bryan. McKinley led the nation both to a return to prosperity and to victory in the Spanish–American War in 1898, taking possession of such Spanish colonies as Puerto Rico and the Philippines. Re-elected handily in a rematch against Bryan in 1900, according to historical writer Eric Rauchway, "it looked as if the McKinley Administration would continue peaceably unbroken for another four years, a government devoted to prosperity".McKinley's original vice president, Garret Hobart, had died in 1899, and McKinley left the choice of a running mate to the 1900 Republican National Convention. In advance of the convention, New York's Republican political boss, Senator Thomas C. Platt, saw an opportunity to politically sideline his state's governor, former Assistant Secretary of the Navy Theodore Roosevelt, by pushing for his nomination as vice president. Roosevelt accepted the nomination and was elected on McKinley's ticket.

Question: When was the Spanish-American War?
1898