July 4 (UPI) — A Connecticut man this week was sentenced to 18 months in prison for not retreating after he was attacked by three people while he was working at a Dunkin Donuts shop.

“I was defending myself,” Jeffrey Sumpter, 21, told Judge John Blawie on Monday at a courthouse in Stamford, Ct., the Connecticut Post reported.

Blawie told Sumpter that he believed him, but had to sentence him under Connecticut law, which requires attack victims to retreat from their attackers. Sumpter’s public defender, Howard Ehring, said Connecticut doesn’t have a Stand Your Ground-type law like in Florida.

Several states in the country have “duty to retreat” laws that apply to people when they’re attacked, but are applied and prosecuted differently, according to jurisdiction.

The incident occurred on Sep. 30, 2017, when three juveniles went into the Norwalk, Conn. Dunkin Donuts where Sumpter worked and attacked him with their fists, according to The Hour. The fight then moved outside and Sumpter stabbed one of his attackers in the leg.

The three juveniles ran away and police found them hiding behind a nearby shopping center. One of the juvenile’s legs was bleeding heavily and he was taken to a hospital.

Three days later, Sumpter was charged with first-degree assault and risk of injury to a minor. At the time, he had a pending charge for violating probation after previously pleading guilty to one charge of carrying a dangerous weapon.

The charge was later reduced to first-degree assault, which he was convicted of on Monday.

Sumpter will spend 18 months in prison and then serve three years of probation.