SAN FRANCISCO (AP) — Lauren Grey didn’t think much about the gender recorded on her Illinois driver’s license until she went to test-drive a new car. Although she had been living as a woman for months and easily obtained a license with her new name and a picture reflecting her feminine appearance, Grey’s ID still identified her as male, puzzling the salesmen and prompting uncomfortable questions.

“They are like, ‘This doesn’t match.’ Then you have to go into the story: ‘I was born male, but now I’m not,’” said Grey, 38, a graphic designer living in suburban Chicago. “And they are like, ‘What does that mean?’ It was super embarrassing.” Similarly awkward conversations ensued when she tried to rent an apartment, went to bars or was taken out of airport security lines for inspection.

Most U.S. residents don’t think twice about the gender printed on their government-issued documents. But those “M” or “F” markers — and the legal and administrative prerequisites for switching them on passports, birth certificates and other forms of identification — are a source of anxiety and, even, discrimination for transgender individuals.

The rules vary from state to state, agency to agency and even clerk to clerk. But a transgender applicant generally has been required to submit both a court order approving the gender change and a letter from a surgeon certifying that the person underwent irreversible sex reassignment surgery before obtaining a new document.

Over the last few years, though, the emerging movement for transgender rights has been quietly pressing the issue, persuading state lawmakers and federal and state agencies to simplify the lengthy and often costly process. Advocates recorded their latest victory Friday, when the Social Security Administration announced that it would no longer require proof of surgery to alter the gender identification of individuals in its computers and records.

The move mirrors similar actions by the U.S. State Department, which amended its passport application policies three years ago to do away with the sex reassignment surgery requirement, and U.S. Citizenship and Immigration Services, which last year did the same for green cards, work permits and other documents it issues.

“Most people may not see this as a big deal, but transgender people know that this seemingly small technical change will protect their privacy and give them more control over their own lives,” Mara Keisling, executive director of the National Center for Transgender Equality, said. “Since 9/11, it’s become … incredibly important to have accurate and consistent identification. Without it, you can’t open a bank account, you can’t use a credit card, you can’t apply for a loan, you can’t get a job, you can’t vote, you can’t get insurance.”

As a result of lawsuits and lobbying, about half of U.S. states — most recently Illinois, Alaska, Virginia and Idaho — now allow residents to revise the gender designations on their driver’s licenses without first undergoing surgery or getting a judge’s approval. Applicants instead must provide a letter from a health professional stating they have received counseling, hormone therapy or another form of gender-transition treatment.

Holding mismatched identification also exposes transgender people to the threat of discrimination or violence, advocates say. A 2008 survey of 6,450 transgender people conducted by the National Center for Transgender Equality and the National Gay and Lesbian Task Force found that 40 percent of respondents had been harassed after presenting an ID that conflicted with how they looked. Three percent reported being attacked, and 15 percent said they had been refused service.

State motor vehicle and vital records departments do not keep count of the number of people who seek to amend the gender markers on driver’s licenses and birth certificates each year. The Williams Institute, a UCLA-based think tank, estimates that 0.3 percent of the adult population in the United States identifies as transgender, or about 698,000 people.

The trend toward making it easier to update such information reflects not only the community’s growing visibility but evolving ideas about what it means to be transgender. While sex reassignment surgery used to be the benchmark for when a person had fully transitioned to the opposite sex, doctors and psychologists now recognize that not every patient wants to be surgically transformed, or can afford the surgery.

“The gender-change process that was used in many states for identity documents was established in the 1970s, and our understanding of who trans people are … has evolved over time,” said Masen Davis, executive director of the Transgender Law Center. “What you see happening today is a reflection of that reality.”

Meanwhile, acquiring a new birth certificate still requires proof of surgery in all but three states: Washington, California and Vermont, according to research by Lisa Mottet, director of the Transgender Rights Project at the National Gay and Lesbian Task Force. Twenty-four states amend existing birth certificates instead of issuing new ones, a practice that advocates say violates the privacy of transgender people who could be “outed” when they need to show documents that still reflect their biological gender. Another three states, Idaho, Tennessee and Ohio, will not change the gender on a birth certificate under any circumstances.

In California, which in 1977 became the first state to allow transsexuals to secure new birth certificates once they had undergone surgery, streamlining the procedures has been a multi-year endeavor. Supporters persuaded the Legislature in 2011 to eliminate the surgery requirement. This year, they are trying to create an administrative process that would allow a new birth certificate to be issued without a court order or legal notice in a local newspaper.

Assemblyman Don Wagner voted against both bills, along with many of his fellow Republicans. Wagner says that although he empathizes with people who find the system cumbersome or cost-prohibitive, he is concerned that eliminating long-standing hurdles creates opportunities for identity fraud.

“There should be substantial evidence to make the change, and I feel these bills perhaps lessen that standard,” he said.

Mottet thinks that worries about identity fraud are unwarranted.

“There is no financial incentive or social incentive to have on your documents a gender that doesn’t match who you are. If John Johnson has a criminal record, it doesn’t help him to have a driver’s license or birth certificate listing him as female,” she said.

Ben Hudson, the director of a Sacramento health clinic that provides treatment vertification for transgender people seeking to update their IDs, said a bigger problem is transgender people receiving outdated instructions from employees charged with processing their paperwork. Just last week, he heard from a client who had gone to the local Social Security office to apply for a card showing her new name. The clerk told her — wrongly — that she needed proof of surgery.

“She had the gumption to ask for a manger. But can you imagine how it adds to your anxiety and depression to be turned away after you worked up the nerve to go into that office and tell your story?” Hudson said. “A lot of transgender people are going to want to just tuck tail and run.”