The presidency of William McKinley began on March 4, 1897, when William McKinley was inaugurated and ended with his death on September 14, 1901. He is best known for leading the nation to victory in the Spanish–American War (1898), taking ownership of the Republic of Hawaii, purchasing the Philippines, Guam and Puerto Rico. Along with his Supreme Court appointment, McKinley appointed six judges to the United States Courts of Appeals, and 28 judges to the United States district courts.