President Donald Trump’s administration sued the California Department of Education on Wednesday for allowing transgender girls to compete on girls sports teams, alleging the policy violates federal law.

The move escalates an ongoing battle between the Republican administration in Washington and Democratic-led California over trans athletes competing in girls and women’s sports.

The lawsuit filed by the Justice Department says California’s transgender athlete policies violate Title IX, the federal law that bans discrimination in education based on sex. The department says California’s rules “are not only illegal and unfair but also demeaning, signaling to girls that their opportunities and achievements are secondary to accommodating boys.”

U.S. Attorney General Pam Bondi warned other states that allow trans girls to compete in female athletics that they could also face challenges by the federal government.

“If you do not comply, you’re next,” she said in a video posted on social media. “We will protect girls in girls sports.”

The state Education Department and the California Interscholastic Federation, the governing body for high school sports that was also named a defendant, said they would not comment on pending litigation.

Democratic Gov. Gavin Newsom’s office deferred to the federation and the education agency to comment on the lawsuit because the governor was not named a defendant. But Newsom’s office said the Trump administration’s attacks on the state’s transgender athlete policies are “a cynical attempt” to distract from the federal government’s withholding of funds for after-school and summer programs.

California has a more than decade-old law on the books that allows students to participate in sex-segregated school programs, including on sports teams, and use bathrooms and other facilities that align with their gender identity.

“These discriminatory policies and practices ignore undeniable biological differences between boys and girls, in favor of an amorphous ‘gender identity,’” the lawsuit says. “The results of these illegal policies are stark: girls are displaced from podiums, denied awards, and miss out on critical visibility for college scholarships and recognition.”

Out of 5.8 million K-12 students in California public schools, fewer than 10 were estimated to be trans students participating in athletics, according to Newsom’s office, The New York Times reported.

Trump criticized the participation of a transgender student-athlete — AB Hernandez of Jurupa Valley High School in Riverside County — who won titles in the California track-and-field championships last month. Assistant Attorney General Harmeet Dhillon wrote in a letter after the meet that the sports body running the final violated the Equal Protection Clause of the Constitution by allowing trans girls to compete against other female athletes.

“I’ve been fighting this issue from the beginning because Title IX is clear: it protects students based on sex, not gender identity,” Chino Valley school board President Sonja Shaw, said in a Wednesday statement.

Shaw filed Title IX complaints against the Jurupa Unified School District with the U.S. Department of Education’s Office for Civil Rights because she felt that it was not just a policy failure, but a civil rights issue.

“Because boys are taking girls’ athletic opportunities and violating their privacy in locker rooms and bathrooms,” she said.

At the state finals, Hernandez, a junior, scored the top marks in the high jump and triple jump. But there were multiple winners because of a California Interscholastic Federation rule change allowing for cisgender female competitors who lost to Hernandez to also win in those events.

Shaw has made the issue a centerpiece of her bid to become the next state superintendent of schools.

During her tenure as board president, she has put forth resolutions to defend girls’ sports and sent letters to the presidential administration outlining what she sees as legal violations.

In April, trustees of the Chino Valley Unified School District agreed to file two federal complaints against the state over its transgender student policies. The board also passed a resolution asking CIF “to preserve Title IX” to “protect female student athletes.”

The federal Education Department earlier this year launched an investigation into California’s policies allowing athletes to compete on sports teams consistent with their gender identity. The agency said last month that the policies violate Title IX, and it gave the state 10 days to agree to change them. But the state this week refused.

“And now, after months of warnings, the smackdown is here,” Shaw said. “We told them. We gave them a chance. They chose to defy the law. Now they’re being sued — and rightfully so.”

Shaw called gender ideology a politicized issue that is being pushed by the California Department of Education and teachers’ unions.

“These boys should never be sent down a path of confusion,” Shaw said. “Children are born beautiful the way they are. Boys are boys. Girls are girls. And truth matters.”

Trump also sparred with Maine’s Democratic governor over the state’s transgender-athlete policies. Gov. Janet Mills told the president in February, “We’ll see you in court,” over his threats to pull funding to the state over the issue. His administration filed a lawsuit in April alleging Maine violated Title IX by allowing trans girls and women to compete against other female athletes.

Meantime, on his podcast in March, Newsom angered some party allies when he questioned the fairness of trans girls competing in girls sports. GOP critics have called on the governor to back a ban, saying his remarks do not square with his actions.

The issue is part of a nationwide battle over the rights of transgender youth in which states have limited transgender girls from participating on girls sports teams, barred gender-affirming surgeries for minors and required parents to be notified if a child changes their pronouns at school. More than two dozen states have laws barring transgender women and girls from participating in certain sports competitions. Some of the policies have been blocked in court.

Trump signed an executive order in February aimed at barring trans girls and women from participating on sports teams consistent with their gender identity.

Proponents of a ban, including the conservative California Family Council, say it would restore fairness in athletic competitions. But opponents, including the LGBTQ+ advocacy group Equality California, say bans are an attack on transgender youth.

The issue has resonated across Southern California.

In late June, a rally in Costa Mesa outside a CIF meeting pressed the agency to bar transgender females from competing in girls’ sports. Demonstrators submitted a petition they said had nearly 20,000 signatures.

Also, in November, a lawsuit alleged that the Riverside Unified School District violated two King High School girls’ rights by ordering them to remove or conceal T-shirts opposing the practice of transgender athletes in girls’ sports.

Staff writer Jordan B. Darling contributed to this report.