The state of Indiana is refusing to recognise a transgender man’s name change, because he’s not a US citizen.

The 31-year-old, who is still legally known by his former female name, is only named as ‘John Doe’ in a lawsuit filed this week.

After transitioning to male, the man sought to amend his state ID and documents.

However, Indiana state law requires proof of US citizenship to approve a name change, leaving the man – who is not a US citizen – stuck being referred to by his former name on state documents.

In the lawsuit, he claims the requirement violates his freedom of speech and privacy to protect his gender identity.

He said: “It is embarrassing, and puts me in danger of violence and discrimination.”

The man explained that his mismatched ID often causes confusion and fraud accusations – and anything from visiting a hospital to getting served alcohol can descend into an argument. John Doe also narrowly avoided arrest during a routine police stop, when the officer had threatened to arrest him unless shown a “real ID”.

The lawsuit, filed in the US District Court for the Southern District of Indiana, is supported by the Transgender Law Center and Latino rights group MALDEF.

It names Donald Trump’s running mate, Indiana Governor Mike Pence, as well as Indiana Attorney General Greg Zoeller and Marion County Clerk Myla Eldridge.

Isa Noyola, programs director for the Transgender Law Center, told the Indy Star: “The state shouldn’t have to force anyone to out themselves as transgender, at constant risk of their own safety, just because they aren’t citizens.”

The man, who was born in Mexico, was granted leave to remain in the US on asylum grounds in 2015.