‘YEAH, I HAD the son of a bitch killed. I’m glad I did. I’m sorry I couldn’t have done it myself!”

These were the words of Carlos Marcello, the Mafia godfather of Louisiana and Texas. And he was talking about the assassination of President John F. Kennedy.

Marcello’s startling admission is in uncensored FBI files at the National Archives, detailed for the first time in a new encyclopedic book “Legacy of Secrecy.” I have been referring to this work off and on for years while the author, Lamar Waldron, completed his investigation into the murders of John and Robert Kennedy and also into the death of Dr. Martin Luther King.

Waldron’s 848-page tome was published in November. It caps 20 years of research that began in 1988 when he didn’t know that Marcello had confessed to JFK’s murder back in 1985. The FBI kept this fact a secret for more than two decades while “conspiracy theorists” ranged all over the place. And . . . the Warren Commission released its fairy-tale version of the death of JFK at the hands of a lone assassin, Lee Harvey Oswald.

IN 1963, only weeks after JFK was killed, the FBI questioned 14 Marcello mob associates. Yet the godfather’s name doesn’t even appear in the Warren Report. This secrecy, it seems, was all because of Cuba. (And that info is contained in Waldron’s first incredible book, “Ultimate Sacrifice.”)

In their massive war against the Mafia, President Kennedy and his brother Attorney General Robert Kennedy were never able to convict any members of the Marcello crime family. And Marcello didn’t make his admission of guilt until he was serving a long prison sentence as a result of an FBI sting called BRILAB. The FBI also carried on a sting against Marcello with the code name CAMTEX.

The FBI groomed an informant who became Carlos Marcello’s cellmate. These tapes have never been released but they reveal the godfather standing in the prison yard, flying into a rage and cussing the Kennedys.

Marcello confessed that he’d also met Lee Harvey Oswald and brought him into the plot via that Louisiana character David Ferrie, a person notably played by actor Joe Pesci in Oliver Stone‘s conspiracy movie “JFK.” Marcello also admitted that it was he who had set up Jack Ruby “in the bar business in Dallas.” (As we know, Ruby did his bit for the Marcello plot when he killed Lee Harvey Oswald before he could implicate anyone else.)

There is now massive evidence, compiled by the House Select Committee on Assassinations, which concluded in 1979 that Marcello “had the motive, means and opportunity to have the president assassinated.”

YOU MAY WONDER why the FBI and CIA withheld information from the committee. By the time of JFK’s murder, dozens of Marcello associates had infiltrated a CIA operation code-named AMWORLD, a project started by JFK himself. Writer Waldron revealed this back in 2005. This was the CIA’s top-secret plan to cooperate with Cuba’s army commander, Juan Almeida, to stage a coup against Fidel Castro on Dec. 1, 1963. That was 10 days after JFK’s trip to Dallas. (The CIA and the Joint Chiefs of Staff even referred to the World War II plot to kill Hitler as their role model for getting rid of Castro. You can see that story told by Tom Cruise in the new movie “Valkyrie.”)

AMWORLD files show that these conspirators wanted to shoot Castro while he was riding in an open jeep. Marcello’s men used that idea to kill JFK in an open car in Dallas. They then planted phony evidence implicating Castro.

After Dallas, powers that be, confused and disoriented, felt that exposing all they really knew about JFK’s assassination might well trigger a third world war, as it was only a year after we had escaped nuclear devastation in the Cuban Missile Crisis.

Commander Almeida is still high in command in Cuba although he was under house arrest in the early ’90s. Today, he is the No. 3 official in Cuba. Yet shortly after JFK’s death, Castro had Che Guevara put under house arrest on suspicion of being the coup leader against him. This triggered a series of events that would eventually lead to the iconic revolutionary leader’s death in Bolivia. (You can see that story in the Steven Soderbergh movie “Che.” The title role is notably played by actor Benicio Del Toro.)

NOBODY SEEMS ever to have completely solved the Mafia-type hit murders leveled at Chicago mob boss Sam Giancana and the popular mob lieutenant Johnny Rosselli. But this indicates to me that these mobsters, who were involved in JFK’s plot to get rid of Castro, were rubbed out by Marcello associates simply because they seemed to be helping the Kennedys.

The 50th anniversary of the Cuban Revolution was Jan. 1. Commander Almeida again seems to escape Castro’s revenge and he is believed able even yet to play a role in resolving the impasse between the US and Cuba.