A Utah inmate remains on the loose Thursday after escaping from a jail by shaving his head and posing as another man who was set to be released, police say.

Kaleb Wiewandt, who has been convicted of mail fraud, was allowed to walk out of the jail in Ogden on Tuesday because staff thought he was inmate Matthew Belnap, according to Weber County Sheriff's Lt. Joshua Marigoni. Belnap, who pleaded no contest to retail theft charges, was set to be freed that night after spending more than 70 days at the facility.

But when jail staff called for Belnap to gather his belongings, surveillance footage shows it was Wiewandt who grabbed his stuff and left, according to court documents viewed by the Associated Press.

On Monday, Belnap had helped Wiewandt shave his head to look like him and he also gave Wiewandt his identification card, authorities said. Wiewandt then recited Belnap's date of birth and Social Security number to jail staff before he was released.

These 2019 photos provided by the Weber County Sheriff's Office show inmate Kaleb Wiewandt, left, and Matthew Belnap. Wiewandt shaved his head to look like Belnap, authorities say.

These 2019 photos provided by the Weber County Sheriff's Office show inmate Kaleb Wiewandt, left, and Matthew Belnap. Wiewandt shaved his head to look like Belnap, authorities say. (AP/Weber County Sheriff's Office)

PARAGUAY INVESTIGATES PRISON ESCAPE OF AT LEAST 75 'HIGHLY DANGEROUS' INMATES THROUGH TUNNEL

Deputies realized they had released the wrong man two hours later, when Belnap told staffers he still needed to be let out.

It's unknown why Belnap allegedly agreed to help Wiewandt – or what he thought would happen to him after Wiewandt left the jail.

Police are now investigating whether the pair believed they could convince guards there had been a mistake and they could both go free, Marigoni said.

Wiewandt, 41, is from Orange County, California, and authorities believe he might try to go there but think he's still in the Ogden area, Marigoni added. He had emailed a woman about plans to pick him up from the jail Tuesday night, according to jail staff.

Wiewandt had been at the jail since December, one month after he was arrested in California for having escaped a halfway house for parolees in Utah in September 2018, court documents show.

ARKANSAS KILLER'S SECOND ESCAPE ENDS AFTER CAPTURE ON PRISON ROOF

He was at the halfway house as part of his supervised release after he pleaded guilty in 2015 to mail and wire fraud in a federal court in Arizona. He acknowledged taking part in a scheme to steal stamps from post offices over two years in which he and others stole $1.2 million in stamps and sold them for nearly half of that value, court documents show.

He was sentenced in 2016 to four years and three months in prison, and three years of supervised release.

It's unclear where Wiewandt went after he escaped the Salt Lake City halfway house until his arrest in November 2019 in California. He was brought back to Utah to face charges of escaping custody. He had pleaded not guilty to that charge and was awaiting a May trial.

Belnap, meanwhile, has been charged with obstruction of justice for his role in the escape.

CLICK HERE TO GET THE FOX NEWS APP

The 36-year-old’s criminal record in Utah includes attempted burglary and several drug-related charges, according to state court records.

Marigoni said an investigation will seek to assess what went wrong at the jail and how they can prevent it from happening again, including the possible addition of a biometric fingerprint scanner.

The Associated Press contributed to this report.