AUGUSTA — A jail official said “a lot of things went wrong” when a man who had been sentenced to prison was mistakenly released from the Kennebec County jail Thursday afternoon.

Freeman A. Taylor Jr. turned himself in about 10 p.m. Thursday after being told the jail wanted him back.

Taylor, 41, formerly of Wiscasset and West Gardiner, was released from the jail because of a clerical error, according to Kennebec County Chief Deputy Ryan Reardon.

“He followed through with our request and came back,” Reardon said Friday morning. “A lot of things went wrong. We’re doing an internal review to make sure it doesn’t happen again.”

It does not appear that Taylor will be charged with escape, Reardon said.

Taylor had been sentenced Thursday to 14 years in prison, with all but four years suspended and four years’ probation. He had been jailed for aggravated trafficking in heroin May 1, 2014, and robbery and illegal possession of a firearm March 10, 2014, all of which occurred in Augusta. He also forfeited $6,832 in cash that was seized by authorities and was ordered to pay $4,000 in restitution for the robbery and $240 for drug testing costs.

It’s not clear whether Taylor will be able to have a previously scheduled visit with his new bride on Monday.

That meeting is why Taylor’s attorney, Brad Grant, sought to keep him in the Augusta jail until Tuesday after his sentencing hearing in Kennebec County Superior Court, a request Justice Robert Mullen granted.

Taylor was to be taken to the Maine State Prison in Warren to serve his sentence after Monday’s meeting.

Taylor had a jailhouse wedding on Valentine’s Day to Tina Whittemore, now Tina Taylor, 49, who was arrested with him on May 1, 2014, in Augusta but who has been free on probation for several months.

At Thursday’s hearing, Freeman Taylor told the judge: “The only thing my codefendant is guilty of is loving me. I understand the effect drug addiction has on family and loved ones.”

He also said that he intended to spend some of his prison time assisting other inmates with Bible studies, and he hoped to make amends for what he’s done.

After Thursday’s accidental release, Reardon said jail policy calls for Taylor to spend three days in an observation cell to make sure there’s nothing in his system and that he’s not holding any contraband.