CHICAGO — After the ESPN cameras were packed away and all the NBA general managers, scouts and agents had left Quest Gym, host of the NBA draft combine, center Jahlil Okafor snuck inside Friday night under the cover of darkness.

Okafor skipped the combine, working out instead in Santa Barbara, Calif., feeling there was no point in meeting with teams before the lottery positioned the clubs.

But the Chicago native, expected to be either the first- or second-overall selection in the June 25 draft, wasn’t going to miss his regular workout with trainer Rick Lewis at their hometown gym. They worked for an hour and 45 minutes as the 6-foot-11 Okafor continues molding into the best shape of his life. Not a scout was in sight.

“We’ve taken 12 pounds of fat off him since the season ended, not muscle but fat,’’ Lewis told The Post. “His conditioning is building.”

The knock on Okafor late in the season was his conditioning. Lewis agreed, saying he believes an ankle injury suffered in February against North Carolina set Okafor back.

“I think he lost his conditioning at end of season because he couldn’t practice,’’ Lewis said. “His body type, he needs to practice and work hard constantly.’’

Okafor flew into Chicago as the combine ended to attend a cousin’s community-college graduation on Saturday. Then he is off to New York on Monday to hold meetings with the NBA before the lottery. The Knicks are seeded second, and if they stay in that position, they likely will have the low-post scoring machine fall to them, with Kentucky’s Karl-Anthony Towns getting top-pick consideration.

Okafor declined comment on the Knicks, but Lewis addressed the most pressing issue — the conventional wisdom Okafor’s defense pales in comparison to that of Towns, something Lewis disputes.

He said he feels Okafor’s role in Duke’s scheme as a stay-at-home pivot didn’t showcase all his attributes.

Lewis, who has worked with Okafor since the center was in eighth grade, thinks the big man was conscious of not getting into foul trouble and didn’t want to take risks on defense.

“Defensively there is no issue with his lateral movement or rim protection,’’ Lewis said. “Every team has a different style of defense and scheme of defense that they promote off the pick and roll. In his last two years of high school, he had an aggressive defensive scheme and had to come up and defend on the pick and roll, and was able to.”

“When you get a coach whose assignments are different, he has to do what his coaches tell him to do. The rim protection piece is basically foul trouble. Having guards coming at you, he was trying to stay out of foul trouble, trying to stay on the floor versus being off the floor. You will see his lateral movement and rim protection and see him defend help-side defense and on-the-ball defense. They allow more contract in the NBA.’’

Lewis said he believes Towns excels as an excellent weak-side defender in helping in rotations, but hasn’t distinguished himself as an on-ball defender.

Duke teammate Justise Winslow, a projected high lottery pick, said of Okafor at the combine: “He’s a great player — offense and defensively. When he’s locked in on defense, it’s hard to say if anybody’s better than him in the country. On the block he’s unstoppable, and a lot of teams had to double him and he can step back and hit a 15-to-17-foot jump shot. He actually has great ballhandling skills for a big man.’’

Winslow said Okafor has to be more consistent with his defensive effort.

“All players struggle with something,” Winslow said. “There’s definitely segments when his defense is unbelievable. but with all of us it’s taking the weaknesses and turning them into strengths.”

ESPN’s combine host Fran Fraschilla said Okafor would help the Knicks next season more than Towns and called Okafor “Grand Central Station’’ in the NCAA Tournament games involving Duke.

“He’ll have more space to work,’’ Lewis said of Okafor. “That’s where offensively, he’s definitely going to be prepared. His offensive game is there and you’ll get to see his lateral movement. His footwork is just as good offensively as defensively.’’

During the workout, Okafor did defensive drills and “plate work.’’ In a specially devised program, Lewis has Okafor lift only the weight plates without a bar to work on muscles usually ignored in regular weight-lifting. It’s part of an injury prevention program as Okafor inches closer to possibly joining the Knicks.

The Knicks will work out Kentucky’s Willie Cauley-Stein in Tarrytown, on the same day Isiah Thomas’ Liberty hold their first practice.