On September 6, 1901, President William McKinley is shaking hands at the Pan-American Exhibition in Buffalo, New York, when a 28-year-old anarchist named Leon Czolgosz approaches him and fires two shots into his chest. The president rose slightly on his toes before collapsing forward, saying “be careful how you tell my wife.”

READ MORE: The Assassination of President William McKinley

Czolgosz moved over the president with the intent of firing a third shot, but was wrestled to the ground by McKinley’s bodyguards. McKinley, still conscious, told the guards not to hurt his assailant. Other presidential attendants rushed McKinley to the hospital where they found two bullet wounds: one bullet had superficially punctured his sternum and the other had dangerously entered his abdomen. He was rushed into surgery and seemed to be on the mend by September 12. Later that day, however, the president’s condition worsened rapidly and, on September 14, McKinley died from gangrene that had gone undetected in the internal wound. Vice President Theodore Roosevelt was immediately sworn in as president.

Czolgosz, a Polish immigrant, grew up in Detroit and had worked as a child laborer in a steel mill. As a young adult, he gravitated toward socialist and anarchist ideology. He claimed to have killed McKinley because he was the head of what Czolgosz thought was a corrupt government. Czolgosz was convicted and executed in an electric chair on October 29, 1901. The unrepentant killer’s last words were “I killed the president because he was the enemy of the good people—the working people.” His electrocution was allegedly filmed by Thomas Edison.

On September 16, after receiving a funeral befitting a president in Washington, D.C., McKinley’s coffin was transported by train to his hometown of Canton, Ohio, for burial.