INDIANAPOLIS — A transgender man granted asylum by the U.S. last year is challenging an Indiana law that prevents him from changing his first name to a male name that matches his gender identity.

The 31-year-old, who was brought to Indiana from Mexico illegally by his parents at age six, contends in his federal lawsuit that Indiana’s law requiring anyone seeking a name-change to provide proof of U.S. citizenship is unconstitutional and essentially forces him to “out” himself as transgender whenever he must display his driver’s license.

That law was passed in 2010 amid what his attorneys say was a spate of “anti-immigrant lawmaking” in several states.

The man’s federal lawsuit says his driver’s license lists his sex as male alongside the female birth name he wants changed, a contradiction that’s forced him to disclose to complete strangers the “deeply personal information” that he’s transgender, causing him embarrassment, humiliation and fears of harassment and violence.

The man, identified in the suit only as “John Doe,” recalled in an interview the humiliation he faced when he visited an emergency room in 2013 for neck pain and nurses began talking about him and laughing when he told one he was transgender after she noticed his ID’s female name.

“I felt really ashamed. I was in pain and I had to go through all that just to get medication,” he told The Associated Press, declining to give his name to protect his privacy. “I’ve done everything I can and just because of that law I can’t live a normal life like everyone else. I just hate it.”

The male gender and female name on his driver’s license are the result of dissonance between state and federal rules.

The Indiana man was granted permission in 2013 to live and work legally in the U.S. under a federal government program that shields immigrants brought to the country illegally as children. At the same time, his gender was changed to male on all his U.S. government documents based on his diagnosis of gender dysphoria, in which a person feels extreme distress because of a disconnect between their birth sex and gender identity, his attorneys said. He used those documents to get an Indiana driver’s license indicating he is male, but he can’t change his name on the license because he needs a state court order, which Indiana won’t grant because of its law.

The only similar state law is in North Dakota, which requires anyone seeking a name change to be a citizen or a permanent resident, said Shawn Meerkamper, an attorney for the Transgender Law Center, which filed the suit Sept. 13 on the Indiana man’s behalf.

Indiana’s attorney general’s office declined to comment on the suit, saying it would review the complaint “and file a response in court at the appropriate time.”

The man, who’s married to a woman who is a U.S. citizen, takes hormones that have deepened his voice and given him a more masculine appearance. He won asylum last year as “a protective step” in case he were deported to Mexico, where he could face persecution for being transgender, said Thomas Saenz, general counsel for the Los Angeles-based Mexican American Legal Defense and Educational Fund, which joined his lawsuit.

Saenz said the man expects to apply for permanent U.S. residency this month, but will still face at least a 3-year wait before that’s approved.

Hiroshi Motomura, a law professor at UCLA who studies immigration and citizenship law, said Indiana’s law is “very vulnerable” to the legal challenge because the U.S. Supreme Court has repeatedly ruled that states cannot treat U.S. citizens and permanent residents differently.

“And when someone gets asylum, they are on a normal track to getting permanent residency,” he said.

The author of Indiana’s law, former Democratic state Rep. Dave Cheatham, said he would support amending it to avoid difficulties for immigrants who “have legal status and want to change their name.”

Transgender advocates say a growing number of foreign-born people are asking the U.S. to grant them asylum because of fears of LGBT persecution in their country of origin.

The New York-based advocacy group Immigration Equality put 366 foreign-born LGBT people into the asylum application process last year — more than double the 179 cases it handled in 2010. The group has about 600 open asylum cases for LGBT and HIV-positive people, said its executive director, Aaron C. Morris.