He was cooked by a Coke.

Jurors in the murder trial of pampered Princeton grad Thomas Gilbert Jr. said their guilty verdict eventually turned on a can of soda.

“The can of coke: it was really our ‘aha’ moment,” said juror no. 11, Steven David Torres.

The juror was referring to the moment when Gilbert showed up unannounced at his parents’ Turtle Bay apartment on Jan. 4, 2015 — and sent his mom, Shelley Gilbert, out for a Coke and a sandwich.

Shelley Gilbert testified that her son knew full well that she never kept that beverage in the house.

The panel of 12 jurors was initially split on Gilbert’s case and wrangled for two contentious days on whether to find him not guilty by reason of mental defect.

“There was a lot of emotion, one side just yelling, ‘He’s guilty! He’s guilty!’ and the other side was like, ’He’s not, he’s sick,’” Torres said.

Then another juror reminded the panel that Gilbert had asked his mom for the can of Coke to get her out of the house so he could fatally shoot his hedge fund millionaire father, Thomas Gilbert Sr.

He was enraged that his parents’ had slashed his allowance and the soda request showed how clear-headed and calculating he was when he committed the crime, several jurors said.

“It was a lightbulb moment for me,” said juror no. 8, Julie Thiry-Couvillion.

Unlike many of the jurors, Linda Corcelles-Alvarez said she never wavered on her belief in Gilbert’s guilt.

“It was all about money. He just shot him in cold blood,” said Corcelles-Alvarez, juror no. 10.

Torres added that most of the panel believed he suffered from severe mental illness but “not at that moment he committed the crime.”

Gilbert is due back in Manhattan Supreme Court Aug. 9 for sentencing.