Harris County Judge Glenn Devlin lost his re-election bid in Texas on Tuesday.

After his loss, he released juvenile defendants who appeared before him and said they did not plan to kill anyone upon their release.

It remains unclear exactly how many juveniles were released, but at least seven were let go.

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 defendants 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.

Public defender Steven Halpert, who watched the releases, told The Chronicle he believed Devlin's decision was in response to the election.

"He was releasing everybody," Halpert said. "Apparently he was saying that's what the voters wanted."

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," Harris County District Attorney Kim Ogg said in a statement.

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.