The Connecticut Appellate Court Friday sided with Middletown, which fired its then-acting police chief for allegedly drinking off-duty while carrying a badge and having his gun visible.

Patrick McMahon said he was drinking nonalcoholic beverages at a local restaurant in September 2011. But he argued that even if he were drinking alcohol at the time, this would not have arisen to the “just cause” needed to terminate him.