Roosevelt served as assistant secretary of the navy and governor of New York before winning election as William McKinley's running mate in the 1900 presidential election. Roosevelt became president following the assassination of McKinley by anarchist Leon Czolgosz in Buffalo, New York; Czolgosz shot McKinley on September 6, 1901, and McKinley died on September 14. Roosevelt was sworn into office on the day of McKinley's death at the Ansley Wilcox House in Buffalo. John R. Hazel, U.S. District Judge for the Western District of New York, administered the oath of office. Being just a few weeks short of his 43rd birthday, Roosevelt became the youngest president in U.S. history, a distinction he still retains.