The nearly 200 transgender people who rushed in recent weeks to change the sex listings on their driver's licenses created an immediate "public safety concern," a state-court judge declared Wednesday in keeping in place a ban on those changes.

The state agency that issues Kansas driver's licenses failed Wednesday to persuade District Judge Teresa Watson that she'd made a mistake in imposing the ban two days earlier. Watson's latest order means that Kansas remains for now one of only a few U.S. states that won't change transgender people's licenses to reflect their gender identities.

The ban is a legal victory for the state's Republican attorney general, Kris Kobach. He argues that driver's license changes by the Kansas Department of Revenue's motor vehicles division violated a new law rolling back transgender rights, which took effect July 1. He sued two top department officials when the agency continued making changes despite the new law, in line with an announcement last month from Democratic Gov. Laura Kelly. The department stopped the changes when Watson imposed the ban.

The ban is set to expire July 24, but Watson's order indicated that she plans to have another hearing on whether she should extend it. In defending the ban, Watson said a key piece of evidence came from the department itself, data showing that the department changed 172 licenses in June alone or a third of all the changes made in the past four years.

KANSAS LAWMAKERS BOTCHED THE DRAFTING OF NEW ANTI-TRANS LAW, ACCORDING TO STATE AGENCY'S LAWYER

"Licenses are used by law enforcement to identify criminal suspects, crime victims, wanted persons, missing persons and others," Watson wrote. "Compliance with legal requirements for identifying license holders is a public safety concern."

After lawmakers enacted the law, driver’s license changes accelerated in May and June as LGBTQ+ rights advocates encouraged people to do it ahead of the new law.

Watson added that allowing license changes to continue would represent an immediate injury to the state and "the immediacy is supported by information" from the department.

The judge had a Zoom hearing Wednesday from Shawnee County, the home of the state capital of Topeka, to consider a request from the Department of Revenue to lift her ban.

Kansas Department of Revenue

Shown above is a sample driver's license issued by the state's Division of Vehicles, first produced in June 2021. (Kansas Department of Revenue via AP)

With the Kobach's lawsuit in its early stages, Watson has yet to hear directly from transgender people affected the dispute. However, five transgender Kansas residents, represented by the American Civil Liberties Union, have asked to intervene in the lawsuit. Watson has yet to rule on that request.

One of them, Adam Kellogg, a 20-year-old University of Kansas student, briefly discussed a traffic stop that occurred when his driver's license didn't match his male identity.

KANSAS AG MOVES TO BLOCK CHANGING SEX ON BIRTH CERTIFICATES

"The officer examined my license for a prolonged period and seemed suspicious of my identity," his statement said. "I would not have chosen to disclose my transgender status during that traffic stop. That experience made me uncomfortable and anxious about further interactions with state officials, including police officers."

The Department of Revenue contends that the new law conflicts with an older one dealing specifically with driver's licenses, in which license applicants are to provide their gender, not sex assigned at birth. And department attorney Ted Smith told Watson that the agency is bound by the older law on driver's licenses and not "the attorney general's legal theories."

Montana and Tennessee also bar changes for transgender people, but their laws deal specifically with driver’s licenses.

The new Kansas law prevents the legal recognition of transgender people's gender identities by defining male and female based on a person’s sex assigned at birth. Although it does not specifically mention driver's licenses, Watson noted in her decision Wednesday that it applies to any state law or regulation.

CLICK HERE TO GET THE FOX NEWS APP

Many critics of the new law view it as sloppily written, and the Department of Revenue argued that GOP lawmakers botched the job.

"It’s clear that they’re trying really hard to sort of go on the attack or at least show that they’re going on the attack against trans people," said Jenna Bellemere, another 20-year-old transgender University of Kansas student. "But at the same time, they clearly lack the capability or the inclination to write any kind of actual functional legislation that makes sense."