Buffalo’s Pan-American Exposition boasted everything from a nine-ton elephant to a 389-foot “Electric Tower” powered by nearby Niagara Falls, but few attractions had generated as much excitement as the two-day visit of President William McKinley. The 58-year-old was fresh off of guiding the United States to victory in the Spanish-American War, and he had entered his second term of office as one of the most popular Chief Executives in decades. On September 5, a record crowd of 116,000 filed into the World’s Fair to watch McKinley give a speech. That same evening, the Expo put on a patriotic fireworks display that culminated with a burst of pyrotechnics that spelled out the words, “Welcome President McKinley, Chief of our Nation and Our Empire.”

McKinley’s final scheduled appearance at the Expo began the following day, September 6, when he attended a public meet-and-greet at a theater called the Temple of Music. The affable commander in chief rarely missed an opportunity to meet his constituents, but this particular event had worried his staff members, some of whom feared that an assassin might take the opportunity to strike. The president’s personal secretary, George B. Cortelyou, had even tried to cancel the reception on two separate occasions. Both times, McKinley had insisted that it remain on the schedule.

Despite the sweltering late-summer heat, a long line of people waited outside the Temple of Music when the reception began at 4 p.m. As the theater’s organist played a Bach sonata, the visitors slowly filed inside, many of them eager for a chance to meet the president and shake his hand. Near the front of the line stood 28-year-old Leon Czolgosz, a shy and brooding former steel worker. An avowed anarchist, Czolgosz had arrived in Buffalo only a few days earlier and purchased a .32 caliber Iver Johnson revolver—the same type of weapon that another anarchist had used to assassinate the Italian King Umberto I the previous summer. He now waited with the gun wrapped in a white handkerchief and concealed inside his jacket pocket. “It was in my heart; there was no escape for me,” Czolgosz later said. “All those people seemed bowing to the great ruler. I made up my mind to kill that ruler.”

McKinley’s anxious staff had added police and soldiers to his usual complement of Secret Service agents, but the security detail took little notice of Czolgosz as he strode up to the president at around 4:07 p.m. When McKinley smiled and extended his hand, Czolgosz raised his pistol—still wrapped in its white handkerchief—and fired two shots at point blank range.

“There was an instant of almost complete silence, like the hush that follows a clap of thunder,” the New York Times later wrote. “The president stood stock still, a look of hesitancy, almost of bewilderment, on his face. Then he retreated a step while a pallor began to steal over his features. The multitude seemed only partially aware that something serious had happened.”

Man seen from behind fires gun at President McKinley's abdomen at close range
De Agostini/Getty Images
The assassination of President McKinley at the hand of an anarchist at the Exposition in Buffalo, N.Y.

The stillness was only broken when James “Big Jim” Parker, a tall African American man who had been waiting in line, punched Czolgosz and prevented him from firing a third shot. A host of soldiers and detectives also pounced on the assassin and began beating him to a pulp. It took an order from McKinley before they finally stopped and dragged Czolgosz from the room. By then, blood was pouring from the president’s stomach and darkening his white formal vest. “My wife,” he managed to say to Cortelyou. “Be careful how you tell her—oh, be careful!”

Just a few minutes after the shooting, McKinley was carried from the Temple of Music and taken to the Pan-American Exposition’s hospital. The only qualified doctor that could be found was a gynecologist, but the president was nevertheless rushed into the operating theater for emergency surgery. One of the bullets appeared to have ricocheted off one of McKinley’s suit buttons and hit his sternum, causing only minor damage. The other had struck his abdomen and passed clean through his stomach. The surgeon managed to suture the stomach wounds and stop the bleeding, but he was unable to locate the bullet, which he assumed was lodged somewhere in the president’s back.

Even with the .32 caliber slug still inside him, McKinley seemed to be on the mend in the days after the shooting. Doctors gave enthusiastic updates on his condition as he convalesced in the Expo’s president’s home, and newspapers reported that he was awake, alert and even reading the newspaper. Vice President Theodore Roosevelt was so pleased with McKinley’s progress that he took off on a camping trip in the Adirondack Mountains. “You may say that I am absolutely sure the president will recover,” he told reporters. By September 13, however, McKinley’s condition had become increasingly desperate. Gangrene had formed on the walls of the president’s stomach and brought on a severe case of blood poisoning. In a matter of hours, he grew weak and began losing consciousness. At 2:15 a.m. on September 14, he died with his wife Ida by his side.

By the time of McKinley’s death, Leon Czolgosz had already spent several days in a Buffalo jail cell undergoing interrogation by police. The Michigan native said he had pulled the trigger out of a desire to contribute to the anarchist cause. “I don’t believe in the Republican form of government, and I don’t believe we should have any rulers,” he said in his confession. “It is right to kill them.”

Czolgosz claimed he had stalked McKinley across Buffalo for two days and had nearly shot him during his arrival at the train station and his September 5 speech at the fairgrounds. He was also adamant that he had acted alone. “I killed President McKinley because I done my duty,” he declared.

Czolgosz was only nominally connected to the American anarchist movement—certain groups had even suspected him of being a police spy—but his confession led to a sweeping roundup of political radicals. In Chicago, a dozen staff members from the anarchist newspaper “Free Society” were arrested. On September 10, police also picked up the anarchist firebrand Emma Goldman, whose speeches Czolgosz had cited as a key influence in his decision to assassinate McKinley.

four black and white head-shot portraits of a young man with dark hair
Corbis via Getty Images
Four halftone portraits of Leon Czolgosz, taken after he was arrested for killing President McKinley.

Goldman and the others were all eventually released, but justice came swiftly for Czolgosz. His murder trial began on September 23—a little more than a week after McKinley’s demise—and he was found guilty and sentenced to death just three days later. On October 29, 1901, Czolgosz was executed by the electric chair at New York’s Auburn Prison. “I killed the president for the good of the laboring people, the good people,” he said in the moments before the sentence was carried out. “I am not sorry for my crime.”

While William McKinley was eventually overshadowed by his more famous successor, Theodore Roosevelt, his assassination prompted a worldwide outpouring of grief. In Europe, the British King Edward VII and other monarchs declared national periods of mourning for the fallen president. A sea of sympathizers later came to view McKinley’s body as it lay in state in the Capitol Rotunda on September 17, and whole cities ground to a halt to pay their respects as his funeral train passed by on its way to his final resting place in Canton, Ohio.

In 1907, the president’s remains were moved to a sprawling tomb complex featuring a domed mausoleum. The memorial includes a bronze statue that depicts McKinley giving his final speech at the Pan-American Exposition on September 5, 1901—the day before his fateful meeting with Leon Czolgosz.

HISTORY Vault: U.S. Presidents

Stream U.S. Presidents documentaries and your favorite HISTORY series, commercial-free