A man who was mistakenly released from the Kennebec County Jail turned himself in on Thursday night.

The Kennebec Journal reports Freeman Taylor Jr., formerly of Wiscasset and West Gardiner, was mistakenly released after a clerical error.

Taylor was sentenced to four years in prison for drug charges on Thursday morning.

Kennebec County Chief Deputy Ryan Reardon says after Taylor returned from court he was accidentally released.

“A lot of things went wrong. We’re doing an internal review to make sure it doesn’t happen again,” Reardon told the Kennebec Journal.

Reardon says Taylor will probably not be charged in connection to the release.