Elishe Wittes is a 17-year old transgender boy who was able to change his gender in the Social Security Administration system under a new Obama administration policy. (Linda Davidson/The Washington Post)

Years before the White House was lit in rainbow colors celebrating the Supreme Court’s decision to legalize same-sex marriage, President Obama used a routine bureaucratic tool that ended up significantly changing the government’s understanding of gender and how it can be changed.

The process began during Obama’s first year in office, when he issued a memo in June 2009 instructing agencies to extend to partners in same-sex couples some benefits that spouses of federal employees receive. Over time, that directive led to a decision by the Social Security Administration to lower the threshold requirements for changing one’s sex on official government documents, a shift that would determine how a person’s gender is recorded on passports, tax returns, marriage licenses and other records.

Since June 2013, people wishing to change their sex on their Social Security cards have needed to provide only a doctor’s note guaranteeing that “appropriate clinical treatment” is underway.

Before then, people seeking to change their sex on the document had to undergo sex-reassignment surgery, an expensive and, many LGBT advocates and doctors say, unnecessary procedure for a transition to take place.

Former White House intern Sarah McBride, who came out as a transgender woman during her senior year in college, discusses the Obama administration’s legacy on LGBT issues. (Jorge Ribas/The Washington Post)

Suddenly, gender — once thought by many, including a rigid federal government, to be immutable from birth — could be changed on Social Security cards with only a note from a medical professional overseeing such a transition, such as the one Elishe Wittes carried with him to the Social Security Administration last summer.

Wittes, 17, a District resident who was born with the physical attributes of a female, filled out paperwork, submitted his doctor’s letter and began the process for changing his sex on government documents to male.

“Not having any kind of legal record that you exist is really problematic,” said Wittes, his eyebrows arching as he described how he used to cringe at the idea of flying with an outdated passport and getting paychecks bearing a girl’s name he had abandoned legally.

Although the Census Bureau does not collect data on transgender Americans as a distinct population, Gary Gates, a demographer at UCLA, said they number about 700,000, or between 0.2 and 0.3 percent of the population. But many say this estimate, based on a couple of state surveys, is too low. In part because of bureaucratic hurdles, one-third of people in the most recent National Transgender Discrimination Survey, from the National Gay and Lesbian Task Force and the National Center for Transgender Equality, reported not having formal identification that matched their gender.

For an administration that has elevated lesbian, gay, bisexual and transgender rights to a national civil rights issue, the public signs of its commitment are obvious. Last month, the White House Champions of Change program focused on the LGBT community, holding an event that featured a bisexual filmmaker who documents the lives of transgender men and women serving in the military and also highlighted an artist who uses musical theater to tell the life stories of transgender men and young people of color.

Three days before that, Obama, in an official presidential message, marked the annual commemoration of transgender people who have been killed.

“The president always says ‘LGBT,’ ” White House senior adviser Valerie Jarrett said in a recent interview. “I can’t think of a time where he left off the T.”

But some of the administration’s low-profile policy shifts reverberate just as deeply.

The Department of Health and Human Services now allows Medicare funding to offset the medical costs of a gender transition and has warned insurers that prohibiting coverage for such transitions can be discriminatory.

The Agriculture Department bars discrimination based on gender identity in any USDA program, while the Department of Housing and Urban Development has applied a similar provision to its federal housing programs.

The changes began quietly when Obama ordered all agencies in 2009 to review what could be done to eliminate disparities between same-sex and straight couples, a directive that administration officials ultimately interpreted much more broadly.

At the time, transgender activists felt slighted. Mara Keisling, executive director of the National Center for Transgender Equality, said that the memo left her and other activists annoyed because it paled in comparison with what they expected of the president.

“We thought, ‘You were going to do stuff, and now you just put out a memo about doing stuff?’ That memo turned out to be one of the most important things the president ever did,” she said.

Over time, that directive — and two others, in 2010 and 2013 — triggered the review of more than 1,000 statutes and hundreds of regulations across the U.S. government, including the change that allowed Wittes to declare himself male and have that affirmation reflected on his Social Security card.

The change was a culmination of years of lobbying by LGBT advocates and underscores how modest administrative actions, not just high-profile executive orders or lofty speeches, can reverberate in the lives of ordinary Americans.

“We are making every effort to make sure that the federal government is recognizing gender identity as a priority,” Jarrett said, “and that we should be ensuring that the civil rights of the transgender community are fully protected.”

The idea of gender not being fixed by birth anatomy has sparked skepticism and resistance among many Americans, and it often puts transgender people in physical danger.

At least 21 transgender people have been killed in the United States this year, according to a new report by the Human Rights Campaign Foundation and the Trans People of Color Coalition. That represents more such killings than in any other year on record.

In July, staff at the Drury Inn in West Des Moines, Iowa, got the police to arrest a transgender black woman on suspicion of prostitution after she and a friend checked in with a license that identified her as male.

Until September 2011, the Social Security Administration routinely informed employers if there was a gender mismatch among workers, a practice that effectively outed some transgender people in their workplaces.

Shortly before Obama took office, activists began pushing to end the federal requirement of surgery as proof of a sex change. Instead, they argued, people should be able to declare themselves male or female, or if not, provide a letter from a medical provider testifying to the treatment they’ve received for changing their sex.

At the time, federal officials already had been quietly preparing for what they viewed as major shifts in societal norms. In 2009, then-Social Security Administration Commissioner Michael J. ­Astrue, a George W. Bush appointee, asked programmers who were rewriting the agency’s software to allow for the Social Security database to accommodate same-sex couples, in case such unions became legal nationwide.

Jonathan Rolbin, who directs the Office of Legal Affairs for Passport Services, said in an interview that the agency’s 2010 policy change “made sense because the more we were reading about things and understanding things, the surgical requirement really was a thing of the past. There are lots of ways to change your gender.” Many now undergo this shift through hormone treatments, hair removal, a name change or other measures that don’t involve surgery.

Social Security officials conducted what Stacy Rodgers, the acting commissioner’s chief of staff, called “an in-depth analysis” starting in the fall of 2011 to ensure that there “were no unintended consequences anywhere across the federal government” when making it easier for people to change their sex on documents. White House officials convened a meeting of several agencies and made the case for revamping the policy; even the federal Railroad Retirement Board was brought into the discussion because it makes pension payments to retirees and their survivors.

Obama’s support of transgender rights is part of an evolution for him and his administration on issues of sexual orientation and gender identity. Before the 2010 midterm elections, several top officials were anxious about embracing controversial social positions that could be used against Democrats who were facing reelection.

“We started from a place of folks not knowing much about the transgender community and being afraid of the politics of the situation,” said Gautam Raghavan, who served as the White House’s liaison for the LGBT community for three years. “But once people understood that people’s lives literally were at stake, and that the federal government could have an impact, they were more willing to be proactive.”

In 2013, after Astrue’s term ended as commissioner, the Social Security Administration changed its policy to accept letters from licensed physicians who either have treated a transgender patient or are familiar with the transition treatment as sufficient proof of a sex change. In October, the railroad board adopted the same policy.

At the White House, the change has taken hold as well. It has had at least three transgender interns and in August hired its first full-time transgender staff member, who works for Jarrett.

Navigating the changes has not been easy. Wittes entered the Social Security office this summer with some trepidation, and he was right to be anxious. Two employees said he didn’t have sufficient proof of his gender transition, even after his mother pulled up the agency’s manual on her smartphone.

One asked, within earshot of other customers, “Have you had gender-reassignment surgery?” Wittes replied, “That is none of your business, and you don’t need to know that in order to do this.”

The second official eventually made the change, wordlessly. As he went to print out a receipt near a couple of colleagues, he gestured toward Wittes, prompting a laugh, the teen said.

Wittes’s mother, Tamara, wrote a complaint to the district manager, Alfredo Navarro Jr. He sent her a written apology and ordered additional “diversity, sensitivity and customer service training” for his staff.

By July, Wittes had a new Social Security card, along with a passport identifying him as male. He recalled taking the passport out of the envelope, kissing it and thinking, “This is the coolest thing in the last 2,000 years.”

“And I’m just sort of dancing around: ‘Yes, I exist. I can prove I’m not a figment of my own imagination.’ ”