A man charged with threatening to shoot up gay clubs in Chicago is once again behind bars after being mistakenly released from jail following a court appearance.

Shane Sleeper, 31, was taken into custody on Chicago's North Side on Thursday afternoon, according to a spokesperson for the Cook County Sheriff’s office.

Shane Sleeper. Cook County Sheriff's Office

Sleeper was released Tuesday by Cook County jail officials because the misdemeanor charges against him had been dropped. Jail officials didn't realize that the charges were only dropped to facilitate the filing of felony charges of state terrorism, hate crimes and harassment, and that he had been ordered held without bail.

The Morning Rundown Get a head start on the morning's top stories. This site is protected by recaptcha

After Sleeper’s accidental release, a spokesperson from the Cook County Sheriff’s office told NBC Chicago that the only communication her office had received was that Sleeper’s misdemeanor charges had been dismissed.

“We were never notified by the State’s Attorney’s office or the Chicago Police Department that he was to be indicted on felony charges,” the spokesperson said, adding that the clerk’s records also didn't reflect that Sleeper had been indicted on felony charges on Tuesday.

However, the Cook County State’s Attorney and the Chicago Police Department appeared to push back on those claims.

Both said that Sleeper had been "arraigned in a felony trial courtroom where he was assigned a no bail status and left in the custody of the Sheriff’s Office," the state's attorney told NBC Chicago in an emailed statement.

A spokesperson for the Chicago Police Department told NBC Chicago his office wouldn’t have anything to do with indictments and blamed the miscommunication on the courts and the sheriff’s department.

Sleeper was originally arrested on Feb. 20 after he was named in six separate harassment cases, according to police. Among the threats attributed to Sleeper, authorities say he suggested to one bar that Chicago would see a similar mass shooting to the one that occurred in 2016 at the Pulse nightclub in Orlando, Florida, that left 49 people dead.

FOLLOW NBC OUT ON TWITTER, FACEBOOK AND INSTAGRAM