With his shaggy beard and rumpled, olive-drab fatigues, Fidel Castro presented himself to the world as a modest man of the people.

At times, he claimed he made just 900 pesos ($43) a month and lived in a “fisherman’s hut” somewhere on the beach.

But Castro’s public image was a carefully crafted myth, more fiction than fact.

“While his people suffered, Fidel Castro lived in comfort — keeping everything, including his eight children, his many mistresses, even his wife, a secret,” wrote Juan Reinaldo Sanchez, Castro’s longtime bodyguard.

Sanchez’s book, “The Double Life of Fidel Castro: My 17 Years as Personal Bodyguard to El Líder Maximo,” describes his former boss’s hidden life of political ruthlessness, mistresses and greed.

Castro, who died Friday night at 90, made a personal fortune offering safe haven to drug traffickers, bedded a bevy of women over the decades, and once threatened his own brother, Raul, with execution when the brother lapsed into alcoholism in the ’90s, Sanchez’s book reveals.

Amazingly, most Cubans had no idea how, or even where, their secretive strongman actually lived.

Even his first and second wives were kept out of the public eye — as was their leader’s two-timing.

Castro cheated on his first wife, the upper-middle-class Mirta Diaz-Balart, with Natalia Revuelta.

“With her green eyes, her perfect face and her natural charm,” Revuelta was one of Havana’s most beautiful women, Sanchez wrote — no matter that she, too, was married at the start of their mid-’50s affair.

Diaz-Balart would bear Castro his first “official” son, Fidel Jr. or “Fidelito,” and Revuelta would bear Castro his only daughter, Alina.

Castro cheated, too, on his second wife, seducing “comrade Celia Sanchez, his private secretary, confidante and guard dog for 30 or so years,” Sanchez wrote.

Castro also bedded his English interpreter, his French interpreter, and a Cuban airline stewardess who attended him on foreign trips, Sanchez wrote.

“He doubtless had other relationships that I did not know about,” Sanchez wrote.

Castro kept 20 luxurious properties throughout the Caribbean nation, including his own island, accessed via a yacht decorated entirely in exotic wood imported from Angola, Sanchez wrote.

Taking control of Cuba on New Year’s Day 1959, after his guerrilla army routed the quarter-century-long dictatorship of Fulgencio Batista, Castro vowed that unlike his hated predecessor, he’d share the nation’s wealth with its poorest citizens.

But while he made good on some of his promises to educate and care for his people — building free schools and hospitals with the help of his Soviet sponsors — Castro’s legacy was also one of repression and hypocrisy.

Deep poverty persisted — teen prostitution, crumbling houses, food rations. Political opponents were executed by the thousands by firing squad, or sentenced to decades of hard labor.

Castro had as many as 11 children with four women — only two of whom he was married to — and numerous other mistresses, Sanchez wrote.

Only those closest to him knew of these affairs.

The only woman who dared to cause him any public scandal was his rebellious daughter, Alina Fernandez Revuelta.

“I remember her in the 1980s, a pretty young woman who had become a model,” Sanchez wrote.

“One day, when I was in Fidel’s anteroom, Pepín Naranjo, his aide-de-camp, showed up with a copy of the magazine Cuba.

“Spread across its second page, Alina could be admired posing on a sailboat in a bikini, in an advertisement for Havana Club rum.”

“What on earth is this?” Fidel exclaimed, according to Sanchez.

“Call Alina, at once!”

What followed was an epic father-daughter blowout.

“Two hours later, Alina strode into his office, not in the least ­intimidated,” Sanchez recalled.

“The ensuing argument was the most memorable of them all: Shouting reverberated all over the room, shaking the walls of the presidential office.”

“Everybody knows you are my daughter! Posing in a bikini like that is unseemly!” Castro raged.

Several years later, in 1993, Fidel learned through his secret service that Alina was plotting to flee to the United States.

“I am warning you: Alina must not leave Cuba under any pretext or in any way,” Castro told his head bodyguard, Col. Jose Delgado Castro, according to Sanchez.

“You’ve been warned.”

Two months later, Alina put on a wig, packed a false Spanish passport, and, with the help of a network of international accomplices, sneaked out of Cuba.

Two months later, Alina put on a wig, packed a false Spanish passport, and, with the help of a network of international accomplices, sneaked out of Cuba.

This, too, ignited the dictator’s temper.

“One rarely sees the Comandante allowing his anger to explode,” Sanchez wrote.

“In 17 years, I saw it only twice. But when Pepín broke the unpleasant news to him that day, Fidel went mad with rage.

“Standing up, he stamped his feet on the ground while pointing his two index fingers down to his toes and waving them around.”

“What a band of incompetent fools!” he cried. “I want those responsible! I demand a report! I want to know how all this could have happened!”

Alina remains one of her father’s most outspoken opponents.

“When people tell me he’s a dictator, I tell them that’s not the right word,” she told the Miami Herald.

“Strictly speaking, Fidel is a tyrant.”

Castro’s second wife and widow, Dalia Soto del Valle, is the least known of Castro’s women, Sanchez noted.

They met in 1961. Castro noticed her in the audience as he gave an open-air speech, Sanchez remembered.

“Fidel spotted in the first row a gorgeous girl with whom he rapidly started exchanging furtive and meaningful glances,” Sanchez wrote.

After being vetted by his aide-de-camp, del Valle was installed in a discreet house just outside Havana.

Eventually, they married and had five sons, who grew up in hidden luxury on an estate outside Havana.

“With its orange, lemon, mandarin, grapefruit and banana trees, the estate resembled a veritable garden of Eden — especially if one compared it with the notorious ration book that all Cubans had to use to buy food,” Sanchez wrote.

Each member of the family possessed his or her own cow, “so as to satisfy each one’s individual taste, since the acidity and creaminess of fresh milk varies from one cow to another.”

Disloyalty exacted a heavy price. Dissidents were jailed for as little as handing out books on democracy.

Castro himself displayed little loyalty, either professionally or personally.

Even his closest aides faced execution if it suited his agenda.

In the late ’80s, when an international scandal brewed over Castro’s exchanges of safe haven for cash with Colombian cocaine traffickers, Castro had no problem throwing those closest to him under the bus.

“Very simply, a huge drug-trafficking transaction was being carried out at the highest echelons of the state,” Sanchez wrote.

Castro “was directing illegal operations like a real godfather,” Sanchez wrote.

Revolutionary Gen. Arnaldo Ochoa, who had fought alongside Fidel and Raul Castro, was at the center of the drug dealings, Sanchez said.

But when the US caught wind, Castro vowed an “official inquiry.”

Raul was forced to watch on closed-circuit TV as a kangaroo court tried and convicted Ochoa — and then to watch the general’s execution by firing squad.

“Castro made us watch it,” Sanchez recalled.

“That’s what the Comandante was capable of to keep his power: not just of killing but also of humiliating and reducing to nothing men who had served him devotedly.”

After Ochoa’s death, Raul plunged into alcoholism, drowning his grief and humiliation with vodka.

“Listen, I’m talking to you as a brother,” Castro warned him.

“Swear to me that you will come out of this lamentable state and I promise you nothing will happen to you.”

Raul, who perhaps knew best what his brother was capable of, complied.

Donald Trump certainly wasn’t shedding any tears over Castro’s death: