A former Atlanta police officer was sentenced Monday to five years in jail for beating a man in 2014 who he falsely accused of stealing a tomato from a Walmart.

Former Atlanta Police Department Sergeant Trevor King, 49, of Stockbridge was convicted in December 2017 on “federal charges of unreasonable force and falsifying a police report,” the Atlanta Journal-Constitution reported.

OFFICIALS: GEORGIA WOMAN DEAD AFTER SHOOTOUT WITH OFFICERS

King was shopping at a Walmart in Atlanta in October 2014 when he said he believed he saw Tyrone Carnegay, 53, stealing a tomato. Prosecutors said King, who was in uniform at the time but off-duty, witnessed Carnegay weighing a tomato before leaving the store. King ran over and stopped the man before he left. The officer hit Carnegay with his baton seven times, leaving him with two broken bones in the victim’s right leg. Surveillance video showed King hitting a man with a baton.

However, King searched Carnegay and discovered a receipt showing he paid for the tomato just a few moments before the attack.

“King then wrote a false report to cover up his unjustified assault,” prosecutors said. “Additionally, King charged the victim with obstructing a shoplifting investigation and with assaulting a police officer.”

MILITARY PLANE CARRYING 9 CRASHES NEAR GEORGIA AIRPORT; NO APPARENT SURVIVORS, OFFICIALS SAY

The former officer was indicted in 2016 and retired in 2017.

King’s attorney called the sentencing “heartbreaking for Mr. King, for his family. He’s a father.”

After Carnegay underwent surgery, he was transported to the Fulton County Jail on “King’s bogus charges,” prosecutors said.

“He got what he deserved,” Carnegay said Monday following the sentencing. “He did me wrong.”