McKinley won his first Congressional seat at the age of 34 and spent 14 years in the House, becoming known as the leading Republican expert on tariffs. After losing his seat in 1890, McKinley served two terms as governor of Ohio. By 1896, he had emerged as the leading Republican candidate for president, aided by the support of the wealthy Ohio industrialist Mark Hanna. That fall, McKinley defeated his Democratic rival, William Jennings Bryan, by the largest popular margin since the Civil War.
As president, McKinley became known--controversially--as a protector of big businesses, which enjoyed unprecedented growth during his administration. He advocated the protective tariff as a way of shielding U.S. business and labor from foreign competition, and he successfully argued for using the gold standard of currency.
Above all, however, McKinley's presidency was dominated by his foreign policy. In April 1898, he was pushed by Congress and American public opinion to intervene in Cuba's struggle for independence from Spanish colonial rule. In the first American war against a foreign power since 1812, the United States handily defeated Spain in just three months, freeing Cuba--although the island became a U.S. protectorate--and annexing Puerto Rico, Guam and the Philippines. For the first time, the United States had become a colonialist power.
America's growing interests in the Pacific led McKinley's administration to greatly increase its involvement in Asian politics. In 1900, McKinley sent thousands of U.S. troops to China to help put down the Boxer Rebellion, aimed at driving out foreigners. His aggressive "Open Door" policy declared U.S. support for an independent China and argued that all nations with commercial interests in China should be able to compete on equal footing.
The popular McKinley won a second term by even greater margins over Bryan, who attacked him on his "imperialism" in the Pacific and, domestically, on the growth of illegal monopolies, or trusts. There was little time to see what his second term would bring, however. On September 6, 1901, while standing in a receiving line at the Pan-American Exposition in Buffalo, McKinley was approached by Leon Czolgosz, a Polish-American anarchist carrying a concealed .32 revolver in a handkerchief. Drawing his weapon, Czolgosz shot McKinley twice at close range. One bullet deflected off a suit button, but the other entered his stomach, passed through the kidneys, and lodged in his back. When he was operated on, doctors failed to find the bullet, and gangrene soon spread throughout his body. McKinley died eight days later. Czolgosz was convicted of murder and executed soon after the shooting.