A former Atlanta police sergeant is headed to prison for beating and arresting a man he incorrectly suspected of stealing a tomato.

Trevor King, 50, was sentenced to serve five years in federal prison for the October 2014 incident followed by three years of supervised release, the U.S. attorney's office in Atlanta said in a news release Monday. A jury convicted him in December.

"King's egregious misconduct is an affront to law enforcement officers who serve honorably and uphold their oath of office with integrity," U.S. Attorney Byung J. "BJay" Pak said in the release.

After paying for groceries at a Walmart store near downtown Atlanta on Oct. 13, 2014, Tyrone Carnegay thought he'd been overcharged for a tomato and returned to the produce department to weigh it. Watching on the store's security monitor, King saw Carnegay weigh the tomato, put it in his bag and walk out of the store.

King suspected Carnegay was stealing the tomato and stopped Carnegay at the store's exit with his baton drawn. Within seconds, King began hitting Carnegay on the legs with the baton, prosecutors said. Carnegay fell to the floor and King hit him again, causing a compound fracture to Carnegay's leg, prosecutors said.

King then found a receipt in Carnegay's pocket that showed he'd paid for the tomato.

King arrested Carnegay on misdemeanor charges of assaulting and obstructing a police officer and wrote a false report to justify the beating, prosecutors said. King wrote in the report that he used his baton after Carnegay tried to push past him and reached for the officer's gun belt.

Carnegay was taken to jail and held for several days after he had surgery on his broken leg. The Fulton County District Attorney's office later dismissed the charges against Carnegay.