A Texas judge who lost re-election released almost all the juvenile defendants that appeared before him Wednesday, a move that drew criticism from local prosecutors.

Judge Glenn Devlin, a juvenile court judge in Harris County, Texas, simply asked his defendants whether they planned to kill anyone before approving their release, the Houston Chronicle reported.

It was not immediately clear how many defendants were released, but the Chronicle reported at least seven. Their charges ranged from misdemeanors to violent crimes.

"'If I release you, will you go out and murder anybody?' And so, if the juvenile said 'No,' they were released," public defender Steve Halpert told KTRK-TV about the hearing. "Judge Devlin would never normally ask that question of a juvenile. This was unusual."

Halpert was requesting release for his client, according to the TV station.

The Chronicle reported that the youth's cases would be heard again, once Natalia Oakes, the Democrat who defeated Devlin on Tuesday, takes the bench in January.

In a statement, District Attorney Kim Ogg slammed the decision saying it "could endanger the public."

"We oppose the wholesale release of violent offenders at any age," Ogg added.

Devlin didn't comment to either the Chronicle or KTRK-TV.

All three juvenile judges in the county lost to Democrats on Tuesday, according to the Chronicle. Halpert told KTRK-TV he thought Devlin's actions were "a post-election weird blip."

"He made a comment, 'This is obviously what the voters wanted' and I think there's an implication by electing all Democratic judges, there's this belief that Democratic judges are going to be soft on crime," Halpert told the TV station.

Posted!

Villagers celebrate the "Pull the Kalyada up on the oak" rite in Martsiyanauka, Belarus. Participants pull the Kalyada, a sheaf of straw on a wooden wheel, up on an oak tree to bring a rich harvest. Sergei Gapon, AFP/Getty Images

Women perform rituals during a holy bath, at the Sangam river, the confluence of three of the holiest rivers in Hindu mythology, the Ganga, the Yamuna and the Saraswati, during Kumbh Mela Festival in Allahabad, India. Prabhat Kumar Verma, EPA-EFE

Anti-Brexit campaigner Steve Bray holds a placard that reads "Wot No Plan B? Ask The Nation" as he demonstrates outside the Houses of Parliament in central London before Britain's Prime Minister Theresa May makes a statement to the House of Commons on changes to her Brexit withdrawal agreement. Tolga Akmen, AFP/Getty Images

Taxi drivers are stopped by Guardia Civil officers as they try to enter into the port, during a protest in Barcelona, Spain. Hundreds of taxi drivers are holding up traffic in Madrid and Barcelona as they continue their protests to demand tighter regulations for companies using ride-hailing apps. Manu Fernandez, AP