The judge was lovin’ his defense.

A Connecticut man had a distracted driving ticket dismissed on Friday, after his lawyer argued that he was eating a McDonald’s hash brown behind the wheel and not talking on a cellphone.

Jason Stiber was pulled over by Westport Police last April and issued a $300 ticket, which he unsuccessfully attempted to fight on his own behalf in Norwalk court.

He then hired an attorney, John Thygerson, who appealed the case this past February and provided records that showed Steiber wasn’t using his phone at the time of the incident.

Thygerson also discovered that the ticketing officer was on the 15th hour of a double shift, according to The Washington Post, suggesting that the long workday could have contributed to human error.

On Friday, Judge Maureen Dennis ruled that the state failed to meet its burden of proof and dismissed the citation.

“I just think this is a classic example of the truism that cops make mistakes. They’re human beings like everyone else and sometimes they get things wrong,” Thygerson told The Hour.

Stiber said he hoped his case would set a precedent that would help others avoid the costly and time-consuming legal process he needed to go through to keep the violation off his record.