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.