LGBT issues have been all over the news this week. On Wednesday, President Trump announced a ban on transgender Americans serving in the military. That evening, the Department of Justice made another significant move in the fight over LGBT rights, albeit with less flash than a tweet storm: It filed an amicus brief in a major case, Zarda v. Altitude Express, arguing that it’s not illegal to fire an employee based on his or her sexual orientation under federal law.

LGBT advocates were quick to decry the DOJ’s position as bigotry. But there’s a deeper context here: The brief was a throw-down in nuanced fight about the nature of the administrative state. During the Obama years, federal agencies slowly began expanding their interpretation of sex discrimination, which is prohibited by a number of civil-rights laws. The Equal Opportunity Employment Commission, the independent agency focused on workplace discrimination, arguably pushed the definition of sex discrimination further than any other regulatory body. In 2015, the EEOC ruled that Title VII, the civil-rights statute that protects workers, covers bias based on sexual orientation; it took a similar position in Zarda. Critics argued that this interpretation reads something into the law that isn’t there and accused the Obama administration of enforcing its political agenda through executive fiat. In effect, that’s exactly what Trump’s DOJ argued in its brief.

While this case will ultimately be decided by the courts, it’s a sign of conflict ahead in the long-brewing battle over LGBT rights and the meaning of sex discrimination. It also shows the limits of executive action in contested areas of law. The Obama administration may have believed gay people should be protected by federal civil-rights statutes, but it may prove challenging to make that interpretation stick now that a new party controls Washington.

In 2010, a skydiving instructor named Donald Zarda lost his job with Altitude Express, Inc., after he told a client about his sexual orientation. As a three-judge panel of the Second Circuit noted in its ruling on the case this spring, “Zarda often informed female clients of his sexual orientation—especially when they were accompanied by a husband or boyfriend—in order to mitigate any awkwardness that might arise from the fact that he was strapped tightly to the woman.” Zarda sued, arguing in part that Altitude Express violated Title VII by firing Zarda based on his sexual orientation. He lost in district court and on initial appeal. Now, the case is being heard by the full Second Circuit.

Enter the battling briefs. In June, the EEOC weighed in supporting Zarda, arguing that sexual-orientation-based discrimination is by definition based on sex and involves sex stereotyping, which has long been prohibited by the Supreme Court. A month later, the DOJ filed a brief making the exact opposite argument. “The sole question here is whether, as a matter of law, Title VII reaches sexual-orientation discrimination,” the department wrote. “It does not, as has been settled for decades. Any efforts to amend Title VII’s scope should be directed to Congress rather than the courts.”

In other words, the government has two opposing opinions on one case, and two opposite interpretations of how the same law should be applied. “It is super wacky, yes,” said Justin Levitt, an associate dean and professor of law at Loyola Law School in Los Angles. “It is very unusual. The federal government usually makes great efforts to be on the same page of this sort of thing.”

Neither the DOJ nor the EEOC is a party in the case—both agencies were essentially offering advice to the court on what to do. That’s part of what makes the battling briefs significant: The DOJ chose to take up this fight when it didn’t have to.

“This Justice Department felt strongly enough that they took the affirmative step to weigh in to undercut the EEOC’s position,” said Vanita Gupta, the president and CEO of the Leadership Conference on Civil and Human Rights.  “That likely required a high degree of vetting at a very high level in the Justice Department.” Gupta led the Justice Department’s civil-rights division during the final years of the Obama administration.

The sex-discrimination provision of federal civil-rights laws has always been controversial, but it has become even more charged in recent years. Cases on this topic regularly bubble up through the court system, and some have made it to the top: This spring, the Supreme Court planned to take up a high-profile case concerning a transgender student in Virginia, but punted when the Trump administration back-pedaled the Obama administration’s previous guidance on how to deal with this kind of issue in schools. Court battles over how to interpret “sex discrimination” have become a proxy war over LGBT rights.

“There are limits ... to what the executive can do without Congress.”

“Unfortunately, there is not a high wall between law and politics sometimes. That’s the case on both sides here,” said Michael Harper, a professor of law at Boston University. “This is a question of statutory interpretation. … Whether the statute should [prohibit LGBT discrimination] and whether the statute does are two different questions.”

LGBT-rights advocates argue that DOJ-style reasoning is straightforwardly incorrect and fundamentally grounded in prejudice. When the Zarda brief came out, the Human Rights Campaign called it “a shameful retrenchment of an outmoded interpretation that forfeits faithful interpretation of current law to achieve a politically driven and legally specious result.” Former Attorney General Eric Holder weighed in on Twitter:

Trump team within 24 hours reverses Obama DOJ positions for gays seeking employment and trans people seeking to serve. This is 2017 not 1617

— Eric Holder (@EricHolder) July 27, 2017

But according to Harper, the law is not so settled. This “is a fine legal brief,” he said. “It makes good legal arguments.” When lawmakers passed Title VII in 1964, they weren’t thinking of sexual orientation, the DOJ brief argues. Until very recently, courts of appeal and the EEOC agreed. Efforts to pass explicit protections for gay, lesbian, and bisexual workers have also always failed in Congress, effectively ratifying legislators’ intent to keep the law the way it is. “One can take this position … without being bigoted or prejudiced,” Harper said.

While politics might have motivated the arguments in the Trump administration’s brief—they “play to the political beliefs, and I would say prejudice, of their base,” Harper said—“that doesn’t make them bad legal arguments.”

Levitt, who previously led the Department of Justice’s efforts on workplace discrimination as a deputy-assistant attorney general in its civil-rights division, disagreed.

“It is not a crazy liberal [argument] … to say that what the words of the statute mean aren’t bound to what was in the heads of the legislature that passed it,” he said. While the sex-discrimination issue is part of an important debate about administrative law, it’s not an option to put off interpreting and enforcing statutes while waiting on Congress to pass clearer legislation, he said: “You have to interpret statutes somehow.”

The downside of that approach is that elections regularly boot parties out of power. If one administration has taken an aggressive stance on a controversial issue, it’s inevitable that their opponents will reverse course when they get in office. “There are limits, when the administration changes, to what the executive can do without Congress,” said Harper. “To have secure change, you have to have congressionally passed legislation.” Even though the circumstances of the DOJ’s brief were unusual, the context was unsurprising. “I can’t say that I’m altogether shocked,” said Gupta. “I’m disappointed, obviously.”

In this particular case, the Second Circuit will decide who’s right, but there’s drama ahead. “This isn’t a good look for the federal government. It is unusual and conflict-seeking,” said Levitt. “The decision to independently file does not reflect a lot of respect for another federal agency with a whole lot of enforcement power.”

The EEOC isn’t obliged to change how it does business just because the DOJ has weighed in, Levitt said: It has binding authority in disputes raised by federal-government employees, and it can continue offering advice based on its current interpretation of Title VII in other cases. What’s more likely to happen is a war of attrition. The two agencies “will stand fuming at each other” until the Second Circuit decides Zarda, Levitt said, and after that, the “fuming will continue.”

It’s impossible to know how this legal throw-down will affect the relationship between the Department of Justice and the EEOC, Levitt said, but the commission surely can’t be happy that another agency stepped on its turf. There will be “a lot of frostier emails,” he said. “I’m sure about that.”