A Texas judge reportedly released nearly all of his juvenile defendants after losing his re-election on Tuesday, but not before asking if they planned to kill anyone.

Harris County Juvenile Court Judge Glenn Devlin on Wednesday ordered the release of at least seven kids ― four facing aggravated robbery charges ― reasoning that this was what the voters wanted, the Houston Chronicle reported.

Devlin, a longtime Republican jurist who has been a presiding judge in the 313th District Court since 2010, was one of dozens of Republicans who had their seats snatched by a Democrat in the state in Tuesday’s midterm election.

glenndevlin.com Harris County Juvenile Court Judge Glenn Devlin released several defendants on Wednesday, reportedly reasoning that this was what the voters wanted after he lost his re-election battle.

Harris County Public Defender Steven Halpert, whose client was among those released by Devlin on Wednesday, said Devlin’s defeat appeared to have motivated the releases, which started with him asking the defendants, ”‘If I release you, will you go out and murder anybody?’”

“I just think this was a post-election weird blip,” Halpert told local Houston station ABC 13. “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.”

Perhaps supporting that suspected motivation, Devlin reportedly reset all of his released defendants’ cases for Jan. 4, which is when his Democratic replacement, Natalia Oakes, takes over.

Oakes, reacting to Devlin’s behavior in an email to HuffPost on Thursday, said: “I would not have expected that from a professional.”

I would not have expected that from a professional. Natalia Oakes, Devlin's replacement

According to a report last month by the Chronicle, Devlin and fellow judge John Philips have a heavy track record of incarcerating juvenile defendants in their county and were behind more than one-fifth of the juveniles sent to the Texas Juvenile Justice Department in recent years.

Harris County District Attorney Kim Ogg condemned the judge’s actions on Wednesday.

“We oppose the wholesale release of violent offenders of any age; this could endanger the public,” Ogg said in a statement sent to HuffPost.

Sharon Watkins Jones, director of political strategies for the American Civil Liberties Union of Texas, also called for an investigation into Devlin’s behavior.

ClassicStock via Getty Images Devlin reportedly reset all of his released defendants’ cases for Jan. 4, which is when his Democratic replacement, Natalia Oakes, takes over.

“Judge Devlin’s mass release of children today, without any apparent concern for the children’s safety or for ensuring that they are released to their parents, proves his detachment from the needs of each child. Reducing mass incarceration and addressing racial disparities require judges to look at people as individuals,” Jones said in a statement released Wednesday.

“We call on the Texas Commission on Judicial Conduct to investigate Judge Devlin for violating the canons of judicial conduct. It is improper for a judge to make orders motivated by partisan interests or spite as a result of his political loss.”

Devlin’s office did not immediately respond to requests for comment.

Houston reporter Keri Blakinger, who broke the story for the Chronicle, said Devlin did not appear in court on Thursday and that his coordinator refused to explain his absence when questioned.

One attorney, while waiting to find out who would oversee Devlin’s cases on Thursday, reportedly told Blakinger that they weren’t in court when the incident happened, “but I sure wish I was.”