Eight presidents have died in office. Through illness or violence, there have been many more very near misses

Eight times in history, an American president has died in office – history altered by a heartbeat. The accidental presidents who succeeded them, neither the voters’ nor their party’s choice, each changed history, for better or worse.

'Transfers of power': Jared Cohen on Accidental Presidents and Trump Read more

Their stories illuminate how America confronted some of its darkest moments. These include a president being kicked out of his own party and annexing Texas in response, a senator trying to shoot a colleague on the Senate floor, violent brawls in Congress, a vice-president accused of conspiring to murder the president, not to mention the 19 times when a president was almost killed by assassination, accident or illness. The fact that only eight presidents have died in office is nothing short of a miracle.

The first close call came in June 1813, when James Madison fell seriously ill for three weeks. Both houses of Congress engaged in lively discussions about the possibility of Madison’s death and Vice-President Elbridge Gerry’s succession. On 2 July, however, a letter from the first lady, Dolley Madison, exaggerating the president’s recovery put a halt to the discussions. Her bet paid off.

In May 1865, Andrew Johnson suffered a serious enough illness that the president pro tempore was put on notice. Beginning in 1882, Chester Arthur battled a severe case of Bright’s disease which would kill him a few years after he left office. In 1893, in secret, Grover Cleveland underwent life-threatening surgery to remove a tumor in his mouth. Franklin Delano Roosevelt was more or less a dying man by the time he ran for a fourth term in 1944. Dwight Eisenhower suffered three medical emergencies from 1955 to 1956, including a heart attack.

Facebook Twitter Pinterest Woodrow Wilson and Edith Galt. Photograph: Library of Congress

But of all the illnesses, Woodrow Wilson’s deserves the most attention. In September 1919, the 28th president suffered a series of strokes. For over a month, the president was so sick he received no visitors and his wife, Edith Galt, and physician, Dr Cary Grayson, essentially took over the affairs of state.

Wilson told his physician: “My personal pride must not be allowed to stand in the way of my duty to the country. If I am only half-efficient, I should turn the office over to the vice-president. If it is going to take much time for me to recover my health and strength, the country cannot afford to wait for me.” However, the manipulative doctor convinced him he would be fine.

Two serious accidents and 10 assassination attempts can be considered close calls. The first credible attempt on a president’s life occurred on 30 January 1835. Following the funeral of a congressman, Richard Lawrence, a British painter who believed he was King Richard III, stalked Andrew Jackson to the east portico of the Capitol, where he attempted to fire two shots. Humidity caused the gun to malfunction twice, a stroke of luck scientists later put at odds of one in 125,000. Jackson beat the assailant with his cane. Lawrence was apprehended, tried and found not guilty by reason of insanity.

The next close call took place on 28 February 1844, when an explosion rocked the USS Princeton. Then secretary of state Abel Upshur and the secretary of the navy, Thomas Gilmer, were killed, as were a number of other top officials and then president John Tyler’s personal slave, Armistead, whose family was given $200 in compensation.

The accident, caused by a gun malfunction during a celebratory firing, killed more top US government officials in a single day than any other tragedy in American history. The vacancies left by Upshur and Gilmer were enough to change the course of events. What was more extraordinary was that Tyler was not among the dead. By a stroke of luck, William Waller, a young attorney from Williamsburg and Tyler’s son-in-law, had begun singing one of the president’s favorite revolutionary war songs, causing Tyler to pause on his way back up on deck. He was also kept below by the presence by Julia Gardiner, the widower president’s crush who would shortly thereafter become the youngest first lady in history.

On 14 April 1865, Vice-President Andrew Johnson was meant to be killed as part of the Abraham Lincoln murder conspiracy. But while John Wilkes Booth carried out the deed, co-conspirator George Atzerodt got cold feet and hit the bottle at a nearby tavern.

On 3 September 1902, a speeding trolley struck Theodore Roosevelt’s carriage, killing his bodyguard (the first member of the Secret Service to die in the line of duty) and driver and propelling the president nearly 40ft to the road. So serious were Roosevelt’s injuries that he required surgery and was wheelchair-bound for nearly six weeks.

Facebook Twitter Pinterest Franklin Delano Roosevelt, with his wife Eleanor Roosevelt at his inauguration in Washington on 4 March 1933. Photograph: Alamy Stock Photo

The next serious near-miss occurred on 15 February 1933. President-elect Franklin Delano Roosevelt arrived in Miami after a 14-day fishing cruise. His first stop was a short one at Bay Front Park, a few words to the American Legion Convention. As his motorcade rolled into gear, Roosevelt spotted a familiar face, Chicago mayor Anton Cermak, a political opponent until the final ballot of the 1932 Democratic convention. Eager to extend a friendly hand, he told his driver to stop.

Roosevelt called the mayor over. As the two shook hands, an Italian immigrant named Giuseppe Zangara drew a nickel-plated .32 caliber double-action revolver and from 35ft fired off five shots in 15 seconds. Cermak took a bullet and eventually died, as did several other spectators. FDR might have been killed had Lillian Cross, a petite spectator standing next to Zangara, not struck the gun with her purse.

The 20th amendment – specifying that in the absence of a president-elect, the vice-president-elect fills the vacuum and assumes the role upon inauguration day – had been ratified on 23 January, although it would not take effect until 15 October. Had Roosevelt been killed, the vice-president-elect, John Nance Garner, would have been sworn in as president on inauguration day. The New Deal, the move toward internationalism: these would never have happened. Roosevelt’s death then would have changed the history of the world.

It didn’t take long for another attempt on FDR’s life, this time during his third term. In 1943, a 38-year-old named Walter Harold Best decided to kill the president. Documentation from the FDR Presidential Library, captured in Mel Ayton’s Hunting the President, shows Best stalked Roosevelt with a .38 caliber revolver and had multiple opportunities to take his shot. But he didn’t and he was arrested on 13 November. A successful assassination would have made Henry Wallace president.

Seven years later, on 1 November 1950, two Puerto Rican nationalists, Oscar Collazo and Griselio Torresola, stormed Blair House, where the president resided while the White House underwent renovations. They killed one Secret Service agent and injured two others. Harry Truman, who had been taking a nap at the time, observed: “If they had waited about 10 minutes Mrs Truman and I would have been walking down the front steps of Blair House and there’s no telling what might have happened.” Had the president been killed, Alben Barkley, 76, the oldest vice-president in history, would have completed the term.

The next failed attempt was Richard Pavlick’s plot to kill John F Kennedy when he was president-elect.

Pavlick, a disgruntled postal worker, hated the Kennedy family. Its victory in 1960 pushed him over the edge. Donating his land to the Spaulding Youth Center in Belmont, New Hampshire, he purchased 10 sticks of dynamite, four cans of gasoline, some detonators and blasting caps, threw it all in his 1950 green Buick and skipped town. He spent the next month stalking Kennedy. In Palm Beach, Florida, he knew that every Sunday the president-elect would drive to church. Pavlick planned to kill him in a suicide attack, driving his dynamite-filled Buick into the side of Kennedy’s vehicle.

On 10 December, he checked into a motel in the cheaper part of town. Right there in the parking lot, in broad daylight, he transformed his car into a murder weapon. The next day, Kennedy prepared to make his way to St Edward Church for morning mass. Pavlick made his way to North Ocean Boulevard just before 10am. Dressed in a dark blue suit, he sat calmly in the driver’s seat, holding a homemade ignition switch. He had filled several cans of gasoline and placed them throughout the car.

Jackie Kennedy walked her husband out and brought Caroline and baby John to say goodbye. Pavlick had no interest in killing a man in front of his wife and kids, so he decided to wait another hour and “get him at the church”.

He transferred some of the dynamite to his pants pocket, attaching the detonator switch to his belt. At church, he sat quietly in the back. Secret service agents took note. When Kennedy found his place in the pews, Pavlick stood up and began to walk towards him. Agent Gerald Blaine took Pavlick by the elbow, and escorted him out of the church.

None of the agents followed him outside. Pavlick waited, his hand in his pocket, a finger on the trigger. But when Kennedy came within 6ft, he failed to flip the switch. Later, he said too many women and children were present. It was no big deal, Pavlick told himself. He’d do it the following week.

As Pavlick got back in his car, Blaine made note of the registration number. He notified the Palm Beach police to run the details and on Thursday 15 December 1960, the police arrested Pavlick.

Pavlick was charged and medically evaluated as competent but he was never put on trial. Instead, he was thrown in a psychiatric institution, where he remained until March 1967. Upon his release, he returned to Belmont, unsupervised.

The lack of judicial process was not a legal miscue. It was a coverup. The secret service had failed to protect Kennedy. In his memoirs, Secret Service chief Urbanus E Baughman, admitted: “The closeness of the call was appalling … Hardly anybody realized just how near we came one bright December morning to losing our president-elect to a madman.”

In 1975, two women tried to kill Gerald Ford. The first attempt, on 5 September, took place in Sacramento. Outside the California state capitol, a 26-year-old Manson Family member, Lynette “Squeaky” Fromme, found her way into the crowd. Hidden in a leg holster underneath her long red dress was a fully loaded M1911.

When Ford stopped to work the rope line, Fromme managed to fire from just 2ft away. Witnesses heard her yell: “It didn’t go off! It didn’t go off!” But according to Dick Cheney, who at the time was Ford’s deputy chief of staff, Secret Service agent Larry Buendorf lunged toward the assassin as she went to fire and managed to get his thumb between the hammer and cartridge of her gun.

Facebook Twitter Pinterest Police and Secret Service men handcuff Lynette ‘Squeaky’ Fromme after she tried to shoot Gerald Ford, on 5 September 1975. Photograph: REX/SB/DS/Keystone USA

There was a lot of confusion because the Secret Service had also tackled Ford to the ground. When agents attempted to whisk him away, Ford insisted he continue with the visit. Fromme told law enforcement Ford’s environmental policies had enraged her and that she had taken it upon herself to save the redwood forest.

Seventeen days later, Ford gave a speech in San Francisco. The Secret Service had heightened security. Once Ford was ready to leave his hotel, the plan was to take a freight elevator down to the garage and the motorcade. However, as Ford went to step out into the basement, the top door of the elevator came down on the president’s head. He fell, his scalp split open. The secret service took him back upstairs, bandaged him up, changed his clothes, and tried the exit again.

Just as Ford stepped outside, Sara Jane Moore took a shot. She missed, partly because an ex-marine named Oliver Sipple hit her arm and jostled her aim. He likely saved Ford’s life. Moore was a radical, picked up the previous day by law enforcement. But there had been no indication of an assassination plot.

Had either attempt on Ford’s life been successful, the presidency would have passed to Nelson Rockefeller. But none of Ford’s top advisers thought much about succession before, during, or after either of the assassination attempts.

“It happened so fast you didn’t have time to even think of transfer of power until it was all over with,” Cheney said. “If the president had been shot, then all of a sudden you would have been in a position where you’ve got to deal with that.”

At the time, Donald Rumsfeld was chief of staff. In this instance, Cheney was back in Washington. “I really hadn’t spent a lot of time” thinking about Rockefeller being a heartbeat away from the presidency, he explained. “We had been dealing with that set of issues ever since Nixon resigned and spent a lot of time [on] … how do you go from Nixon to Ford, not because he was shot, but because he had to resign.”

In that sense, the country was well prepared.

It didn’t take long for the next close call to arrive. In 1980, a deranged loner named John Hinckley fell in love with the actor Jodie Foster after seeing the movie Taxi Driver. After months of stalking, calling and writing, he decided killing the president was the key to her heart. He began following Jimmy Carter, first to Dallas and then to Dayton, Ohio, where he shook Carter’s hand. He traveled to Nashville on 9 October, ready to kill him. But Ronald Reagan’s success in the polls was making him lose interest. He aborted his mission and returned to the airport, where the X-ray machine discovered his guns. Hinckley was arrested, had his guns confiscated and was fined $62.50.

On 29 March 1981, Hinckley traveled to Washington and checked into the Park Century hotel on 18th Street NW, two blocks west of the White House. He was not far from the Hilton on Connecticut Avenue, where the next day Reagan would address a union meeting. On 30 March, the first thing Hinckley did was compose a letter to Foster.

“There is a definite possibility that I will be killed in my attempt to get Reagan,” he wrote. “This letter is being written an hour before I leave for the Hilton hotel. Jodie, I’m asking you to please look into your heart and at least give me the chance with this historical deed to gain your respect and love. I love you forever.”

Facebook Twitter Pinterest The moments just after John Hinckley tried to assassinate Ronald Reagan, on 30 March 1981 outside the Washington Hilton hotel. Photograph: HO/REUTERS

Hinckley fired six shots in two seconds, hitting Reagan in the chest, injuring Secret Service agent Timothy McCarthy, police officer Thomas Delahanty and press secretary James Brady, who was left partially paralyzed. Reagan was rushed to George Washington hospital, where doctors performed a two-hour surgery to remove a .22 caliber bullet that had hit his seventh rib and penetrated his left lung. He spent nearly two weeks in the hospital and made a full recovery.

The last credible assassination attempt against an American president took place in Tbilisi, Georgia, on 10 May 2005, when a terrorist named Vladimir Arutyunian tried to kill George W Bush.

The attempt is not well known. Asked about it, neither Condoleezza Rice, Bush’s national security adviser and second secretary of state, nor Cheney, his vice-president, had more than a brief recollection.

“I remember the incident. I don’t remember where I was,” Cheney said. “I don’t recall any sense of crisis, or ‘Gee, that was a close call’ … The president moved on and we had all moved on. It’s a little bit like that Squeaky Fromme thing.”

Rice had a similarly understated recollection: “I gather it was pretty serious, but I actually didn’t know and I don’t think the president knew until we were back in the car.”

More etched in her mind was the post-9/11 moment when Bush threw out the first pitch at the World Series.

“I was just scared,” she said, “and I thought, ‘I know he is wearing a bulletproof vest, but what if someone just shoots him.’”

Facebook Twitter Pinterest Georgian special police servicemen detain a man suspected of throwing a grenade during a speech by George W Bush. Photograph: STRINGER/RUSSIA/REUTERS

Nonetheless, the incident in Georgia was serious. Arutyunian threw a RGD-5 hand grenade at the president, only to see it ricochet off a girl and land 61ft away. Arutyunian had wrapped the grenade in a red tartan handkerchief, to conceal it. This kept the firing pin from deploying quickly enough. The grenade malfunctioned.

Years later, Dana Perino, Bush’s deputy press secretary, was shocked to learn of the seriousness of the attack. She was with the press corps in Tbilisi, roughly 50 yards from the stage. It was a sunny day, her birthday, and she remembered an enthusiastic crowd. Bush gave a speech and the whole thing was handled so seamlessly Perino did not even notice a disturbance.

Later, she said, just before boarding the press charter flight, she “heard there had been a security incident with a grenade of some sort but it did not go off.

“What I recall was being told that it was somebody who was not very sophisticated with bomb-making, and that it was a dud. And after that, I don’t really remember hearing anything else about it.”

We have been lucky, in that no president has died in office since 1963 – the longest period in our history. While we hope that unprecedented period endures, it is inevitable that there will be a death in office again.

Rather than prepare, we seem likely to leave any such outcome to chance and luck. We can, however, take a different lesson from the story of all the near misses and the confusion which surrounded them, which is that the constitution is a living document. It’s our job to fill in the gaps.

This is an edited extract from Accidental Presidents by Jared Cohen, published in the US by Simon & Schuster on 9 April