At the start of the 20th century, Buffalo was the world's leading grain port and a national flour-milling hub. Local mills were among the first to benefit from hydroelectricity generated by the Niagara River. Buffalo hosted the 1901 Pan-American Exposition after the Spanish–American War, showcasing the nation's advances in art, architecture, and electricity. Its centerpiece was the Electric Tower, with over two million light bulbs, but some exhibits were jingoistic and racially charged. At the exposition, President William McKinley was assassinated by anarchist Leon Czolgosz. When McKinley died, Theodore Roosevelt was sworn in at the Wilcox Mansion in Buffalo.