A Texas judge released nearly all of the juvenile defendants who appeared before him earlier this week after he lost his bid for re-election.

Upon losing the election, Harris County Judge Glenn Devlin released nearly all juvenile defendents who promised that they did not plan to kill anyone, according to Local 10.

The juveniles were in court facing charges ranging from misdemeanors to violent crimes, The Houston Chronicle reported.

It remains unclear exactly how many people were released, but it is believed that at least seven, including four facing aggravated robbery charges, were let go by Devlin.

Harris County prosecutors expressed concern over Delvin’s decision.

"We oppose the wholesale release of violent offenders at any age. This could endanger the public," District Attorney Kim Ogg said in a statement.

Related content

Devlin, a longtime Republican, rescheduled all of his cases after a Democrat defeated him in Tuesday's election for a seat on the bench.

In 2017, Devlin and another juvenile court judge in Harris County, John Phillips, accounted for more than 20% of all youths sent to juvenile state prisons, according to an investigation by The Chronicle.

Harris County Chief Public Defender Alex Bunin told NBC News he was "baffled" by Devlin's decision.

"It's definitely not good for the kids in that they are being released without any conditions," Bunin said.