As you read this, the world’s most notorious drug dealer, Joaquin “El Chapo” Guzman, is sitting uncomfortably in a 136-square-foot jail cell in lower Manhattan’s Metropolitan Correctional Center.

But he nearly escaped justice. And it’s all Sean Penn’s fault.

Chapo had run the infamous Sinaloa cartel since the 1980s and was responsible for much of the cocaine, marijuana, meth and heroin flowing into the United States. Both American and Mexican law enforcement had attempted to arrest him, but he proved almost supernaturally slippery. He escaped from Mexican lockups twice and was a fugitive for decades, rarely sleeping in the same place twice.

On Oct. 2, 2015, Mexican marines were finally closing in on the drug lord. They had tracked him to a rugged hilltop compound in La Tuna. Just as the order was about to be given to move in, two people inexplicably arrived: Sean Penn and Kate del Castillo, a Mexican soap opera actress who had praised Chapo online. The two were there ostensibly to speak to Guzman about making a film of his life, but Penn later published an infamously softball interview with the kingpin in Rolling Stone.

Fearing the actors would be caught in the crossfire, commanders ordered the marines to stand down. The military waited for the celebrities to leave and, instead of going in on foot, chose to attack by helicopter. They lost the element of surprise, and El Chapo escaped again.

“Oh, my God! If I could get my hands on Sean Penn!” Jack Riley, the former No. 2 at the US Drug Enforcement Agency, tells The Post. “The people he put at risk because of that stunt. He should be in jail.”

Riley pushed to have Penn and del Castillo prosecuted for obstruction, but his boss at the DEA and officials at the Department of Justice declined to pursue the case, citing Penn’s protection because he was acting as a journalist.

Riley vowed to redouble his efforts to get Chapo. “And if Sean Penn was up there again, to hell with him. Nothing was going to stop us.”

Nothing did. Chapo was arrested for good in 2016, and Riley tells the incredible story in a new memoir, “Drug Warrior: Inside the Hunt for El Chapo and the Rise of America’s Opioid Crisis” (Hachette Books).

Riley, now 60, grew up and spent much of his career more than a thousand miles from the border.

He was raised in suburban Chicago, the son of a hospital pathologist and a nurse.

Shortly after graduating from Notre Dame, he joined the DEA and began working undercover. His alias was “John Lynch,” a trust-fund yuppie making coke buys. After busting one small-fry dealer, however, Riley began to wonder if he was making a difference. He longed to go after the dealers further up the hierarchy.

He’d soon get his chance, starting in the early 1990s, when he first heard the name “El Chapo.”

During the 1980s and early 1990s, the US drug war largely focused on Colombia and its Cali cartel. Mexico was not yet a major a player.

That changed with Guzman, who announced his arrival by executing rivals and beheading several Mexican cops.

“The images were seared into my soul. I never forgot the brutality, or the name,” Riley writes.

Chapo showed a flair for logistics that few outlaws could match. He was dubbed “El Rapido” because of his ability to move drugs from Mexico into the United States within 24 or 48 hours.

“Guzman was the most business-savvy sonofabitch who ever ran a criminal organization,” Riley writes.

In 2007, Riley was tapped to head the El Paso DEA office, in large part because of his knowledge of El Chapo, who, despite his stranglehold on the American drug market, was still unknown to many in US law enforcement.

The Texas post was crucial because it included territory that encompassed nearly one third of the US-Mexico border.

Upon his arrival, Riley announced to the press that he was there for one reason: “to get El Chapo under control.”

The kingpin took notice. Soon, an ominous sign reading, “Welcome Jack Reilly [sic]” was hung off an overpass just across the border in Mexico. The DEA also picked up intel that Chapo had put a $100,000 bounty on Riley’s head.

Money for bribes was built into Chapo’s business model.

One night, Riley was driving along a deserted road between El Paso and Las Cruces, NM (where he lived with his wife and son), when he noticed he was being followed by two vehicles.

Riley sped up to 100 mph, and the vehicles still kept up. He pulled into a neighborhood and tore down residential streets at 60 mph but couldn’t shake the pursuers.

Finally, he pulled into a playground parking lot, jumped out of the car, gun drawn and crouched beside it, waiting for a firefight.

The pursuers pulled up and stopped before inexplicably speeding off. “I think that whole thing was just to scare the s–t out of me,” Riley says.

The incident cemented Riley’s resolve.

“I got pissed off and said, ‘This guy is going. It’s either him or me,’” Riley says. “I’m a stubborn old Irish cop from Chicago. I’d put my money on me.”

Riley vowed not to retire until Chapo was behind bars.

In 2010, he returned to Chicago to head that DEA office. He attempted to build a case against Guzman by targeting the local gangs who worked for him.

In a particular stroke of malevolent genius, Chapo had anticipated the opioid crisis. He knew Americans were becoming increasingly hooked on pain pills, and he gambled that when they were unable to get prescription meds anymore, they would turn to his heroin. He sent smack flooding north, including on Chicago’s streets.

In 2013, the city named Chapo Public Enemy No. 1. Riley’s office got valuable leads by wiretapping local criminals’ phones.

“What really stands out is how stupid all these guys were,” Riley says. “On one call, [a dealer] is talking to Chapo’s guys in Mexico, and he says he thinks the ‘three letters’ [DEA] are onto us. So the guy says, ‘Don’t call me at this number anymore.’ Then he gives out his new number. We laughed our ass off in the office.”

American intelligence began zeroing in on El Chapo by monitoring the phones of those around him. Chapo ordered his henchmen to dispose of their burner phones regularly, but many got lazy and didn’t.

The US also used drones to surveil suspected hideouts, hoping to snap an image of Chapo.

The method led to several close calls (in one raid, Chapo escaped through a tunnel hidden beneath his bathtub) and ultimately his capture in 2014.

A few months after his arrest, however, Chapo was gone, escaped through a mile-long tunnel his crew had dug beneath the Mexican prison. Riley, by then second in command at DEA, had flown down a few days earlier to notify Mexican officials that Chapo was planning to escape. The warning went unheeded.

Both American and Mexican law enforcement had attempted to arrest [Chapo], but he proved almost supernaturally slippery.

Money for bribes, Riley says, was built into Chapo’s business model.

In late 2015, officials suspected he was heading to Los Mochis, a coastal town in Sinaloa. Surveillance images showed construction crews fortifying the front door on one house, and locals were overheard murmuring, “Papi is coming.”

In the end, “burritos and porn are what did him in,” Riley writes.

On January 2016, Mexican officials saw a van leaving from a safe house with three men, including Chapo, inside. The group went for Mexican food and to pick up dirty movies, before returning.

The marines moved in. Chapo escaped through the sewer and emerged, carjacking a ride before being apprehended. He was extradited to the US in 2017.

Riley, who is now retired, is gleeful that his nemesis is behind bars and on trial, facing 10 counts.

“It’s fabulous,” he says. “After the scare in New Mexico that night, he got to me. I started looking over my shoulder, started second guessing what I was doing. I lost focus for a while.

“I love that he’s sitting in jail and he’s now feeling the same way.”