On Nov. 1, 1950, with the White House undergoing renovations, President Harry Truman was napping upstairs at Blair House, the guest house across the street.

At 2:15 p.m., as he slept, “two Puerto Rican nationalists, 37-year-old Oscar Collazo and 24-year-old Griselio Torresola, approached Blair House from opposite directions . . . Collazo was armed with a Walther P-38 and Torresola with a Luger, both 9 mm pistols.”

Torresola, approaching from the west, noticed White House police officer Leslie Coffelt and shot him three times. Collazo, from the east, approached the front door and shot Officer Donald T. Birdzell in the leg.

Awakened by the shooting, Truman looked out the window and saw one of the officers lying wounded on the street. He stuck his head out to ask who had been hit, but a Secret Service agent yelled at him to get back inside.

The leader of the Secret Service would later reprimand the president for this risky, reckless act.

While agent Stewart Stout, inside Blair House, awaited the assassins with a submachine gun, Collazo was taken down by an agent at the building’s door, while Torresola shot another officer before a mortally wounded Coffelt felled him with a shot to the head, the officer’s final act before dying in service to his country.

Had the would-be assassins made their approach 10 minutes later, they would have seen the president and his wife leave the building through the door right next to where they lay in wait.

Any president will do

We tend to think of attempts on the president’s life as relatively rare — with John Hinckley’s shooting of President Ronald Reagan in 1981 as the last truly life-threatening incident.

But the new book “Hunting the President: Threats, Plots, and Assassination Attempts — from FDR to Obama” (Regnery) by Mel Ayton shows that both threats and attempts are far more common than we know. Every president, regardless of party or ideology, has thousands of threats on file at any moment, with usually around 400 or so regarded as serious.

Those who threaten the president rarely do so for political reasons, writes historian Ayton, but more commonly due to mental illness or as a blaming reaction to personal hardship.

(While threats against President Obama by white supremacists and other right-wing extremists shot up in his first year in office, since then, Ayton writes, the number of threats against him has fallen in line with presidential averages). In investigating the many threats and attempts against presidents from Franklin Roosevelt to Barack Obama, Ayton found a surprising number of assassins for whom the identity of their victim was incidental.

Before killing Robert Kennedy in 1968, Sirhan Sirhan wrote in his diary of his desire to kill Lyndon Johnson. And months before murdering Kennedy’s brother in 1963, Lee Harvey Oswald grabbed a gun and went to a speech by former Vice President Richard Nixon, who had talked about having Fidel Castro, Oswald’s idol, removed from power. Oswald’s wife, understanding his murderous intent, locked him in a bedroom and threatened to call the police.

Shortly before Hinckley shot Reagan, the madman bought guns and trailed then-President Jimmy Carter across the country. Hinckley got as close as several feet from the president at an event in Dayton, Ohio, just to see if he could, then followed him to Nashville before changing his mind. After the 1980 election, he shifted his focus to the new president.

In 1972, a man named Arthur Bremer decided that he would become a “celebrity” by assassinating either President Richard Nixon or Alabama Governor and Democratic presidential primary candidate George Wallace.

He chose Nixon.

In April, he brought several guns up to Ottawa, where Nixon would be meeting with Canadian Prime Minister Pierre Trudeau, and positioned himself at a vacant service station along the president’s motorcade route.

Bremer waited for hours, with a gun in his pocket, for Nixon’s car to pass. But when it did, it drove by too quickly for him to take a shot. He tried again the next day but initially left his gun in his hotel room and took too long retrieving it to catch the president. When a third attempt was thwarted by the tight crush of security due to anti-war protesters, Bremer gave up on Nixon and decided to target Wallace instead.

A month later, Bremer shot Wallace five times at a campaign stop, paralyzing him for life.

Crackpots and car bombs

Some assassination attempts we either never learned about, or which were written off by the media as minor, came shockingly close to achieving their goals, some even before the president in question could take office.

Three weeks before his inauguration, Franklin Roosevelt gave a brief speech in Miami, talking for less than two minutes from his car. The mayor of Chicago, Anton Cermak, was also there.

After Roosevelt spoke, Cermak shook his hand, and then shots rang out. The bullets missed Roosevelt by just two feet, but Cermak was hit. The shooter, Giuseppe Zangara, was initially sentenced to 80 years, but when Cermak died of his injuries, he was tried again and sentenced to death. “I have the gun in my hand. I kill kings and presidents first and next all capitalists,” Zangara confessed. Cermak, meanwhile, reportedly told Roosevelt:

“I’m glad it was me and not you.”

John F. Kennedy also came close to never taking the oath of office.

In December 1960, a month before Kennedy’s inauguration, 73-year-old Richard Pavlick parked his car outside of Kennedy’s Palm Beach, Fla., mansion. Underneath his blue suit coat, he wore as much dynamite as would fit, all wired to a switch in his pocket. The Secret Service later called the explosives enough to have “blown up a small mountain.”

Pavlick, who had followed Kennedy from town to town and photographed his Hyannis Port home in order to check out the security measures, planned to ram his car into Kennedy’s limousine and then flick the switch, killing Kennedy and himself.

Waiting outside the mansion, he watched Kennedy leave the building with his wife and children. Kennedy got into the car as Jackie watched and waved, but Pavlick hesitated because, he later said, he didn’t want to hurt the family.

He tried again later that day as Kennedy attended church, but when the president-elect left, he was surrounded by kids. Pavlick abandoned the attempt and flew home, intending to return four days later. The Secret Service, which had been tipped off by people who received ominous postcards that Pavlick sent from campaign stops, arrested him at home, and he wound up in a mental institution for six years.

Long shots and x-ray guns

More often, of course, those seeking this sort of evil notoriety take out their anger on the president, not the president-to-be.

In 1994, 26-year-old Army veteran Francisco Martin Duran began stockpiling assault weapons and ammo, and spoke of a desire to kill President Bill Clinton. His goal set, he drove to Washington, DC, buying a trench coat and more weapons along the way.

On Oct. 29, he “walked to the White House and watched President Clinton return to the executive mansion via a helicopter that landed on the White House lawn.”

He shifted to the north side of the building and just stared at it for over an hour. When he heard two boys remark that a man by the North Portico looked like the president, he saw his chance.

Duran “pushed the boys aside, slipped a semiautomatic assault rifle from beneath his coat . . . and began firing at the person he mistakenly believed was Clinton.”

He fired off “at least 29 rounds . . . Five bullets hit the mansion’s four-foot-thick sandstone wall, and three shattered a window and chipped the stone of the Press Briefing Room near the West Wing.”

No one was injured, and bystanders knocked Duran down when he went to reload. Among the items police found when they searched his truck was a nerve-gas antidote and an atlas with the words “Kill the Pres” written on the cover.

Some plots were notably crazier. Last year, Glendon Scott Crawford, 49, and Eric Feight, 54, “planned to build an X-ray gun to target Muslims,” and also intended to kill President Obama with “a lethal dose of radiation.”

Crawford reached out to both the KKK and Jewish groups hoping for funding, but all alerted the FBI, who sent undercover agents to infiltrate the plot.

The pair were arrested, but later the prosecutor said that the device they built “would have been capable of emitting X-ray radiation that would have caused death” and only failed to do so because the undercover agents had provided them with faulty parts.

Grenades and Catman

In 2005, President George W. Bush was giving a speech in the nation of Georgia when Vladimir Arutyunian, 28, “threw a live, Soviet-made RGD-5 hand grenade toward the podium where Bush was standing.”

The grenade “hit a girl, cushioning its impact” and didn’t explode because “it had been wrapped in a red handkerchief, which kept the firing pin from deploying quickly enough.” The FBI later said that had the grenade exploded, it was close enough to the president to have possibly killed him.

In 1978, Anthony Henry, 35, “had become obsessed with the alleged ‘blasphemy’ of placing ‘In God We Trust’ on United States currency.”

Determined to address this with President Jimmy Carter, he hid a knife in a Bible, donned a karate gi and, sans shoes, “scaled the White House wrought iron fence along Pennsylvania Avenue” a “short distance” from where the president ate lunch with his wife.

Henry “charged the North Portico,” and “police officers cut him off near the front fountain, forming a ring around him. Henry kept spinning around into defensive karate stances, holding the knife and shouting anti-government slogans as officers tried to cajole him into surrendering. Officers jabbed at Henry with their clubs, but during the confrontation he slashed one officer’s face and another’s arm.”

After 15 minutes of this, Henry was finally captured and “put into a police paddy wagon. As he was driven away, he shouted, ‘I don’t know why they put ”In God We Trust” on that money!’ ”

During his time in office, President Reagan was stalked by a man who called himself “Catman,” and who not only sent letters and “close-up photographs of his intended victims,” but also “lots of photos of cats.”

After he was arrested in 1983, the Secret Service found photos of him “outside the fence at . . . Gracie Mansion during a presidential visit. Catman had been close enough to shoot President Reagan, but his shot had apparently been blocked by agents.”

Friendly fire

While many of the tales in “Hunting the President” are surprising, none are as shocking as learning that we almost had two presidents killed on the same day.

The night of John F. Kennedy’s assassination and Lyndon Johnson’s swearing-in, an agent named Gerald Blaine had been assigned to protect Johnson in his Washington home.

In the scrambling chaos and panic, new security procedures had been put into place by the Secret Service, but no one remembered to tell the new president.

That night, Blaine “heard the sound of someone approaching” from the wrong direction and grabbed a Thompson submachine gun.

“He expected the footsteps to retreat with the loud sound of the gun activating, but they kept coming closer. Blaine’s heart was pounding as he placed his finger firmly on the trigger. The next instant he saw the new president of the United States.

“Johnson had just rounded the corner, and Blaine had the gun pointed directly at his chest. The agent [later] said that a split-second later he would have pulled the trigger. Just hours after JFK was assassinated, America came close to losing his successor.”