TALLAHASSEE (CBSMiami/NSF) – An appeals court Wednesday ordered a new trial for a former Uber driver who was convicted of sexual battery in an alleged attack on a passenger in Palm Beach County.

A three-judge panel of the 4th District Court of Appeal overturned the conviction of Gary Timothy Kitchings, ruling that a circuit judge made errors before Kitchings was found guilty of three counts of sexual battery, one count of burglary and one count of false imprisonment.

READ MORE: Overnight Fire in Fort Lauderdale Condo Leaves One Dead, Second Hospitalized

The case stems from allegations that Kitchings sexually assaulted a passenger, identified in the ruling by the initials M.R., in his car and in her home in 2017.

Kitchings, a 57-year-old Uber driver at the time, contended that they had consensual sex. Wednesday’s ruling centered, in part, on a statement Kitchings gave to police during an interview after his arrest.

During the interview, Kitchings repeatedly denied the sexual-assault allegations.

Prosecutors did not offer a transcript or recording of the full interview as evidence in the trial but focused on inconsistencies between the interview and Kitchings’ trial testimony.

READ MORE: Miami Police Department Sees Record Number of Applications In Hours

The appeals court said the full statement to police should have been admitted in the trial.

“Once the State implied that Kitchings’ trial testimony was fabricated, the defense should have been permitted to show that Kitchings had provided an earlier, consistent statement to the police,” said the 20-page ruling, written by appeals-court Judge Robert Gross and joined by judges Dorian Damoorgian and Mark Klingensmith.

“Given the prosecutor’s often misleading cross-examination about inconsistencies and omissions, introduction of the entire statement would have placed these matters in a broader context so the jury could have fully evaluated the veracity of the trial testimony.

The trial judge abused her discretion by refusing to allow the admission of Kitchings’ statement to the police.” Kitchings was sentenced to 22 years in prison and is at Lancaster Correctional Institution, according to the ruling and the Florida Department of Corrections website.

MORE NEWS: Banksy 'Charlie Brown' Sells For $4 Million, While Child Prodigy Thrills Crowd With His Artwork

(©2020 CBS Local Media. All rights reserved. This material may not be published, broadcast, rewritten, or redistributed. The News Service of Florida’s contributed to this report.)