A sign on a bathroom at a hotel in Durham, North Carolina, protests HB2.Jonathan Drake / Reuters

Updated on May 5 at 8:10 a.m.

DURHAM, N.C.—The U.S. Department of Justice is joining Bruce Springsteen, Paypal, and the NBA in weighing in against North Carolina’s HB2, the controversial law that—among other conditions—mandates that transgender people use the bathroom conforming to the gender on their birth certificate, rather than the one which they associate, in state buildings, and bars cities from enacting ordinances to require transgender-bathroom accommodation.

In a letter to Governor Pat McCrory on Wednesday, the Justice Department said that HB2 violates Titles VII and IX of the Civil Rights Act. In the letter, first reported by The Charlotte Observer, Principal Deputy Assistant Attorney General Vanita Gupta notes that Title VII of the law prohibits employment discrimination on the basis of gender, and that courts have interpreted that to include gender identity of transgender people. The letter (via WRAL) states:

H.B. 2 … is facially discriminatory against transgender employees on the basis of sex because it treats transgender employees, whose gender identity does not match their “biological sex,” as defined by H.B. 2, differently from similarly situated non-transgender employees …

H.B. 2 places similar restrictions on access to restrooms and changing facilities for all public agencies in North Carolina. By requiring compliance with H.B. 2, you and the State are therefore resisting the full enjoyment of Title VII rights and discriminating against transgender employees of public agencies by requiring those public agencies to comply with H.B. 2.

The department demands that McCrory respond by close of business on May 9 that he will remedy the violations, “including by confirming that the State will not comply with or implement H.B. 2.”

While simply violating Title VII would make HB2 illegal under federal law, proving that would require a court decision. The hammer here is Title IX. The federal government provides billions to state schooling systems around the country through the Department of Education. Including universities, North Carolina receives about $4.5 billion, almost $900 million of that to public lower schools. If the state is in violation of Title IX, the Department of Education could shut off the spigot of money for schools, blowing a huge hole in the state education budget.

A wide range of groups of sued to challenge the law. Several of them also wrote to the Department of Justice, requesting a letter like the one sent today. Three of those groups, the American Civil Liberties Union, ACLU of North Carolina, and Lambda Legal issued a statement applauding the letter.

“It is now clearer than ever that this discriminatory law violates civil rights protections and jeopardizes billions of dollars in federal funds for North Carolina,” the statement said. “The only way to reverse the ongoing damage HB 2 is causing to North Carolina’s people, economy, and reputation is a full repeal.”

McCrory responded cautiously, criticizing the letter but leaving the state’s options open.

“The Obama administration has not only staked out its position for North Carolina, but for all states, universities and most employers in the U.S.,” McCrory said in a statement. “The right and expectation of privacy in one of the most private areas of our personal lives is now in jeopardy. We will be reviewing to determine the next steps.”

State legislators passed the law during a special one-day session in March. Members of the General Assembly called themselves into session to pass the law, which was introduced after 10 a.m. and signed into law around 9 p.m. the same evening. It was passed to preempt a local ordinance passed in Charlotte that would have required business to provide transgender bathroom accommodations. The law also banned local LGBT non-discrimination and living-wage ordinances.

The backlash to the law has been fierce. Musicians have threatened boycotts, businesses have canceled job-expansion plans, conferences have been canceled, and the NBA says it will move the 2017 All-Star Game, planned for Charlotte, if the law remains unchanged. Democrats have filed a bill to repeal the law, but they are badly outnumbered in the state legislature. GOP leaders in the General Assembly, as well as McCrory, a Republican, have staunchly defended HB2.

The Justice Department’s demand could be subject to litigation, and the fate of such a case would be unclear. But in a decision in the Fourth Circuit Court of Appeals in April, judges ruled that the Department of Education should be able to interpret Title IX to include transgender people if it wished. The decision came in a lawsuit brought by a transgender teen in Virginia, but North Carolina is in the same circuit. The Justice Department cited that case in its letter.

We want to hear what you think. Submit a letter to the editor or write to letters@theatlantic.com.