In the summer of 1960, a former FBI and sometime CIA man named Robert Maheu was handed an important mission by the latter agency — engaging the Mafia to assassinate Cuban leader Fidel Castro.

Maheu knew exactly whom to call. The new book “Handsome Johnny: The Life and Death of Johnny Rosselli — Gentleman Gangster, Hollywood Producer, CIA Assassin,” by Lee Server (St. Martin’s Press), provides the most detailed description of the plot against Castro to date, and introduces Rosselli as the link between the mob, Hollywood and the CIA.

Rosselli had been friends and associates with the likes of Al Capone, Charlie Chaplin and Columbia Pictures co-founder and President Harry Cohn.

He was one of the most powerful gangsters in Los Angeles, and the right person for Maheu to enlist.

Still, it was an odd and risky request. Certainly, the mob hated Castro, as it had made Cuba its playground before Castro took over and confiscated its property. But the Mafia wasn’t a fan of the US federal government, either.

According to Server, Maheu offered $150,000, which Rosselli told him to keep. If he did the job, it would be for love of country, although getting the mob’s Cuban properties back was a not-insignificant benefit.

Before he could say yes, though, he had to clear it with the big boss in Chicago, Sam Giancana. (The mob there was known as the Outfit.)

Giancana approved the mission. He relished the chance to get back at Castro for confiscating his Cuban properties, including nightclubs and a fleet of shrimp boats. But Giancana saw yet another chance to have the government and the mob working together, believing the federal government would wind up owing him more than it could ever repay.

As it happened, writes Server, the Outfit was already working hard to try to get John F. Kennedy elected president.

Not long before, the name Kennedy had been anathema to the Outfit, as the candidate’s brother Robert Kennedy had served as chief counsel for a congressional committee dedicated to destroying organized crime and had been a vocal, public mouthpiece against it.

But Server lays out how earlier that year, family patriarch Joseph Kennedy, not wanting to leave his son’s election to chance, decided to ask the Outfit for help and approached Giancana through their mutual friend, Frank Sinatra.

The superstar crooner vouched for the Kennedys, telling Giancana on the golf course, “I believe in this man,” meaning JFK. “I think he’s going to make us a good president. With your help, I think we can work this out.”

Giancana started to lay out the Outfit’s concerns, but Joe Kennedy waved them away.

After commiserating about Bobby — his father reportedly told the men he had no idea how his boy had become such a prig — Kennedy said that if the Outfit helped JFK win Illinois, the federal government would owe them one and Bobby would not be a problem.

“It’s Jack who’s running for president, not Bobby,” he said. “This is business, not politics.”

Now, with the request to kill Castro, Giancana pictured a federal government that would be virtually in his pocket if the Outfit could deliver.

Server writes that the assassination-planning team — consisting of Rosselli, Maheu, Maheu’s CIA case officer, James O’Connell, Giancana, a mystery contact of Rosselli’s said to be a link to the Cubans, and south Florida mob boss Santo Trafficante Jr., who had also lost property to Castro — met in Miami in October to discuss details.

O’Connell suggested a “gangland-style hit” with “machine guns blasting,” writes Server, but the gangsters vetoed that, believing it would fail and get the gunmen killed. They thought that either poisoning or a sniper shooting from long range were their best options.

‘They f–ked us. The Kennedys f–ked us good.’

O’Connell had a source for poisons, and Trafficante said he’d provide the killer.

As they waited in Miami for Trafficante to find the right person, the operation was almost derailed by Giancana’s love life.

Rosselli told Maheu that Giancana had to leave Miami for Las Vegas. Maheu was incensed, as they were in the middle of a mission and the CIA had gone to great pains to establish the protocol for Castro’s death, with an improvised army lying in wait to take over the Cuban government. As the army was ragtag, Castro’s murder needed to happen fast and all involved needed to stay put.

The problem was that Giancana heard a rumor that one of his girlfriends — the love of his life, he said — was having an affair with a “two-bit comedian,” Dan Rowan from the comedy team of Rowan & Martin.

Maheu offered to bug Rowan’s Las Vegas hotel room, Giancana agreed and Maheu hired two men he trusted, a private eye and an electronics expert, to do the job.

The men checked into Rowan’s hotel, bugged his room as promised and monitored him from their own room.

One night, with little happening, the men decided to catch Rowan’s act. While they did, a maid let herself into their room to bring them fresh towels. Seeing their setup, she told her supervisor, who called the police. The men were arrested, Maheu’s involvement was uncovered and the FBI opened a criminal investigation, placing a cloud over the operation.

With no assassin yet in place, Election Day came and John F. Kennedy was elected president. Giancana and other Outfit leaders gloated, most likely correctly, that “their efforts had been crucial to the JFK win.”

But their anticipation of easy dealings ahead was quashed when the new president-elect named his brother Bobby as his attorney general.

“They f–ked us,” said Giancana. “The Kennedys f–ked us good.”

Meanwhile, there was still no assassin by year’s end. The group splintered, and Rosselli wondered if “this vital government mission was already muddled beyond repair.”

On New Year’s Day 1961, Castro gave a speech that included mention of the CIA plot to invade Cuba. Two days later, the United States broke off relations with the country. As the makeshift invading army cooled its heals, word spread that outgoing President Dwight Eisenhower had decided to punt on the invasion, leaving it for his successor. Kennedy had been informed of the plans but knew nothing of the assassination plot, nor that the CIA was working with the mob.

By March, Trafficante had finally found their man and brought Rosselli to meet him.

“The man was to deliver [poison] to an ally in the capital, a cook or servant with access to the dictator’s food and drink,” Server writes.

The CIA sent a package containing the most modern and lethal neurotoxin — developed, Server writes, by “Cornelius Roosevelt, grandson of President Teddy” — and Rosselli handed it off to a Cuban courier, who sent it off to Havana.

Now there was little to do but wait.

Maheu called Rosselli several days later, citing a newspaper article about how Castro had fallen ill. “This is it. Won’t be long now,” said Maheu. But he was wrong, because Castro recovered.

“The illness had been a coincidence. Or the poison failed. Or the cook had been canned, or the agent had been caught or Castro had found a new place to eat,” Server writes.

“At CIA headquarters, they were pacing the floors, tearing at their hair. They had invested $40 million dollars in an invasion. Twelve hundred men stood ready. Stories about the ‘top-secret’ rebel army were beginning to appear in newspapers. The element of surprise had all but slipped away. To postpone again was impossible.”

The CIA recruited its own man this time, someone close to Castro, and Rosselli supplied him with poison “in the form of pills hidden inside a customized pencil.”

The agency never heard from the man again. Castro learned of his duplicity, and the man hid out in the Mexican Embassy for five years.

Shortly after this, on April 17, 1961, President Kennedy ordered the failed Bay of Pigs invasion of Cuba. Castro’s forces humiliated the US’s ragtag crew, and Rosselli’s mission was ended.

He was contacted by O’Connell in 1962 and told the plot was back on and that this time, it would be leaner, just him and the CIA. But the results were the same. After months of planning and getting poisons to Cuba, Castro remained alive. This time, the Cuban Missile Crisis killed the plan for good.

Giancana was found dead on his kitchen floor with seven bullets in him on June 19, 1975, at age 67.

Rosselli was last seen alive on July 28, 1976, at age 71, after spending the morning in his sister’s home in Plantation, Fla. His body was found on Aug. 7 inside a steel drum off a Miami beach. His legs had been severed and placed next to him. Neither murder was ever solved.

Castro passed away in November 2016 of natural causes. He was 90 years old.