A 31-year-old Lincoln Park man who allegedly threatened to kill the manager and patrons of several North Side gay bars was mistakenly released from Cook County Jail before being taken into custody Thursday afternoon.

Shane Sleeper, who spent two days on the loose, was arrested in February for allegedly threatening the manager of the popular gay club Sidetrack, saying that “Orlando will happen in Chicago.”

The alleged statement was thought to have been a reference to the 2016 mass killing at the Pulse nightclub in Orlando, in which a gunman opened fire inside the club, killing 49 people. Sleeper had been jailed on those charges since Feb. 21.

On Monday, misdemeanor charges against Sleeper were dropped — as prosecutors filed felony charges in a total of 13 new cases alleging Sleeper also threatened to shoot up the nearby bar Roscoe’s and threatened and harassed a half-dozen people on different occasions dating from 2016 to a few days before his February arrest.

Jail officials at 10:30 a.m. on Tuesday received notice that the charges against Sleeper had been dropped, but not about the new ones that had been filed or that Sleeper was to be held without bond until after 7 p.m., Cara Smith, director of policy for Sheriff Tom Dart, wrote in an email to the Circuit Court Clerk Dorothy Brown’s office.

In a response email, Associate Clerk Renee Banks wrote that the electronic notification on at least some of the new charges was transmitted by 5:26 p.m. Tuesday. Court records indicate the no-bond order for Sleeper was signed at 9:30 that morning.

Banks’ email also suggests that a sheriff’s officer usually brings over copies of court orders. Smith said Thursday that the sheriff’s office had no copies of the orders on his new charges.

Brown, whose office has been the source of a years-long federal investigation, last month announced that she would be running for mayor.

Sleeper was released Tuesday night, and remained free until around noon Thursday, when the Sheriff’s Fugitive Task Force arrested him without incident at a friend’s house a few blocks from his apartment.

Prosecutors filed a terrorism and hate crime charges, as well as counts of stalking, impersonating a police officer, making death threats in person and by phone, and other charges. Sleeper was also accused of harassing a half-dozen people in incidents dating back to 2016 up to a few days before his arrest earlier this year.

At Sidetrack, prosecutors said Sleeper told the manager that “the reality was the next mass shooting would be committed, guns would be had, and had (Sleeper) a gun, (the manager) would be dead,”