Three decades ago, a female employee of a large accounting firm was passed over for a promotion after her supervisors concluded that her drab wardrobe, makeup-free face and crude demeanor were disturbingly unfeminine.

The worker, Ann Hopkins, successfully sued the company for discrimination. Today, her precedent-setting case is being used in a way that Hopkins may never have imagined: to make the argument that discrimination against transgender people is prohibited under federal laws that bar sex discrimination.

That argument — that disparate treatment against transgender people is a form of sex discrimination — is not new. In recent years, state and federal courts, the Equal Employment Opportunity Commission and the Obama administration have adopted that position, despite the fact that federal law does not explicitly protect people on the basis of sexual orientation or gender identity.

But the argument this week has taken center stage in an escalating dispute between the Obama administration and North Carolina, which earlier this year became the first state to require students, state employees and visitors to government buildings to use public restrooms that match their biological sex at birth.

On Wednesday, the U.S. Justice Department issued a letter to North Carolina Gov. Pat McCrory (R), warning that the bathroom restriction violated federal law — and put at risk millions of dollars in federal funding the state receives every year.

“The state is engaging in a pattern or practice of discrimination against transgender state employees,” wrote Vanita Gupta, the head of the civil rights division.

The Hopkins case, which was ultimately decided by the Supreme Court, figured prominently in Gupta’s letter. The justices found that discrimination on the basis of sex could include sex stereotyping — the belief that women ought to look and act stereotypically feminine — as well as other “sex-based considerations.”

Gay and transgender plaintiffs have, in recent years, successfully used that conclusion to win discrimination lawsuits against their employers. The rationale, legal analysts say, is that any assumption that a man must only be intimate with a woman, for example, or that someone who was born biologically female must identify a certain way, amounts to sex stereotyping.

The most recent court victory for transgender advocates came last month, when a panel of the Fourth Circuit Court of Appeals sided with a transgender student in Virginia who had challenged his school district’s policy barring him from the boy’s restroom. It deferred to the U.S. Department of Education, which has interpreted the federal law prohibiting sex discrimination in schools to apply to transgender students.

The district has requested a hearing of the full court.

Supporters of the North Carolina law and similar restrictions say it is necessary to think further back than the Hopkins case, to 1964, when Congress enacted the Civil Rights Act.

“There’s no way they ever conceived of the transgender issue,” said Mat Staver, chairman of the Liberty Counsel, a conservative Christian legal organization that has defended bathroom restrictions. “It eviscerates the statute if it all becomes a matter of subjective interpretation of the individual who is claiming discrimination.”

Religious freedom proposals are being weighed in nearly a dozen states after the Supreme Court legalized gay marriage. (Claritza Jimenez/The Washington Post)

Staver added that Congress has had multiple opportunities to add gender identity and sexual orientation to sex, race, national origin and religion as protected categories of individuals. So far, it has rejected all efforts to add those categories to existing civil rights laws.

While courts and the EEOC have sided with transgender activists recently, Staver believes it is likely that the question will have to be sorted out by the Supreme Court.

James Esseks, director of the Lesbian Gay Bisexual Transgender & HIV Project at the American Civil Liberties Union, said that while it is unlikely the original writers of the Civil Rights Act had transgender people in mind when they included protections against sex discrimination, they probably did not consider sexual harassment either. Now, courts routinely consider sexual harassment a form of sex discrimination.

Moreover, he said, the Supreme Court ruled in a separate case that it is not the intent that matters but the text of the law. “We’re just coming to a deeper understanding of how sex discrimination happens in America,” he said.