John Gotti’s right-hand man during his two-month murder and racketeering trial in 1992 was US Marshal Lenny DePaul, who cuffed the Dapper Don daily and escorted him from the slammer to the federal courthouse in Brooklyn.

It was a tough job: guarding against the mobster’s escape and protecting him from hit men — and, in Gotti’s mind at least — hunger pangs.

“John would say, ‘Do me a favor. For lunch, sneak down to Little Italy. I know somebody down there. We’ll buy you a sandwich. Bring back some sandwiches,’ ” DePaul told The Post.

“He was dead serious about it,” continued DePaul, who refused to help the mobster out of his pickle.

Gotti took his food seriously, but often showed a lighter side to DePaul.

After Gotti got in a fight at the Metropolitan Correctional Center in Manhattan, he was thrown in solitary confinement and needed a judge’s permission in order to get out.

“So I go pick him up, and on the way over to court he says, ‘What do you think the judge’s going to do? He’s not going to let me out.’ I said, ‘No John, he’s going to be in a good mood today; he’s going to let you out of solitary and back into general population.’

“So I look at him and he’s got a $300 tie on, and I say, ‘I bet you your tie that you get out today.’ ”

Sure enough, the judge sprang Johnny Boy.

“I have him back in my car, and I go around to take him out of the back, and what’s sitting on the seat? The tie — he held up on his end of the deal,” said DePaul, who said he stuffed the tie back in Gotti’s pocket.

DePaul was there for the dramatic moment Gotti realized he was betrayed by Gravano, who turned government witness and helped take down his best friend and the Gambinos.

“One day, I came upstairs and there was no Sammy Gravano. John was as quiet as a church mouse — which was very unusual for John. We get on the elevator and he was just head down, wasn’t saying anything to me. I get on, push the button, elevator starts to move and I turn to John and say, “Where’s Sammy? What, is he a rat?’ Now I’m being the funny guy,” DePaul said.

“If looks could kill, I would have been dead on that elevator. But I had no idea what the FBI was doing with Sammy Gravano at the time.
And of course, the next day, you wake up and in The Post is “Sammy the Bull cooperates.’”

DePaul, 56, details his time with the Dapper Don in the new Mike Earp and David Fisher book “US Marshals.”

DePaul escorting Gotti from a courthouse in 1992.

He went on to become a chief inspector/commander of the Marshals during his 24-year career and a star in the A&E show “Manhunters: Fugitive Task Force.”

After Gotti received his life sentence on June 23, 1992, DePaul, who details the scene in the new Mike Earp and David Fisher book “U.S. Marshals: Inside America’s Most Storied law Enforcement Agency” escorted the mobster to Stewart International Airport in Newburgh, NY, where he was to be put on a plane bound for a federal penitentiary in Marion, Ill.

“I’m thinking, ‘OK the guy is done, he’s going away for the rest of his life . . . no more funny John Gotti.’

“So I said, ‘John, I guess this is it?’”

Gotti took three steps up to board the plane and turned around. “He said, ‘You think it’s too late to say, ‘I’m sorry?’ ” DePaul said.

It was hardly sincere.

“That was his sarcastic response to me saying good bye to him,” DePaul said. “That was John being John.”