EVANSVILLE, Ind. — An Evansville man accused of setting a fire at his apartment and leaving a bomb near a restaurant has pleaded guilty but mentally ill to charges in the case.

Twenty-seven-year-old Caleb Loving entered the plea to charges of arson and possessing a destructive device on Friday. He entered the same plea to charges of battery on a public safety officer and resisting law enforcement stemming from a June 17 incident at the Vanderburgh County Jail in which he hit a deputy in the face with a broom handle.

Sentencing in both cases is set for Oct. 16.

Loving was arrested in July 2015 and accused of setting fire to his apartment and then carrying a duffel bag with two explosive devices to a nearby restaurant.