(Reuters) - Three transgender people sued an Alabama state agency on Tuesday, alleging its policy requiring proof of gender surgery to change the gender indicator on driver’s licenses was discriminatory.

The lawsuit filed by the American Civil Liberties Union said the Alabama Law Enforcement Agency’s policy denied transgender people access to identification, and applicants were forced to release medical information to get driver’s licenses.

“Anyone who is eligible for a license should be able to get one that they can use without sacrificing their privacy, safety, health, autonomy or dignity,” ACLU lawyer Gabriel Arkles said on a conference call with reporters.

A spokeswoman for the state law enforcement agency did not respond to requests for comment. A spokeswoman for the state attorney general’s office said by email it had no comment.

One of the plaintiffs, Darcy Corbitt, said she had been publicly humiliated when she applied for a driver’s license in August. A clerk loudly discussed her gender identity in a crowded license office and at one point called Corbitt “it,” she said.

“In half an hour, I was subjected to the most blatant cruelty another human being had ever inflicted on me,” said Corbitt, who has changed her gender identity on her U.S. passport, Social Security card and North Dakota driver’s license.

The ACLU is asking a federal judge to overturn the policy in Alabama, one of nine states that require transgender applicants to show proof that they have undergone gender-affirming surgery before they can switch their gender marker on driver’s licenses, Arkles said.

The ACLU filed the lawsuit in U.S. District Court in Montgomery on behalf of Corbitt, a doctoral candidate at Auburn University; Destiny Clark, a member of the board of Central Alabama Pride, a gay rights group; and a third transgender person who was identified as “John Doe” in the lawsuit.

Julie Ebenstein, a lawyer with the ACLU Voting Rights Project, said the driver’s license policy also potentially restricted transgender people’s access to the polls because Alabama required photo identification, such as a driver’s license, to cast a ballot.

The ACLU has successfully challenged similar driver’s license rules in Alaska and Michigan, Arkles said.