Joshua James, the Florida man who threw a live alligator through a Wendy’s drive-thru window last year, has agreed to plead guilty to misdemeanor charges in his case.

James has agreed to allow Palm Beach County Judge Barry Cohen to decide his sentence in an open plea to the court, defense attorney Dean Merton told the judge Friday morning.

Cohen set James’ sentencing for May 31.

The resolution to the case comes just three months after James’ arrest in the October incident, which he said was just a prank.

Surveillance camera footage and a credit-card record led the Florida Fish and Wildlife Conservation Commission to James. Just after 1 a.m. on Oct. 11, a white four-door pickup truck pulled into a 7-Eleven gas station in Royal Palm Beach, according to the FWC.

The driver, later identified as James, climbed out of the truck through the driver’s window instead of the door, officials wrote. James, wearing jeans and a hat turned backward, and an unidentified male talked outside the truck while James pumped gas and appeared to keep looking at something inside it, according to security footage mentioned in the FWC report.

FWC workers subdued the alligator at the restaurant and taped its mouth shut. They later released the animal at a nearby canal.