The Trump administration and New York City’s public schools have reached a deal to allow some funds to flow to local magnet programs while their legal battle over school gender policies plays out.

The order, which was approved Thursday by a Manhattan federal court, lets the magnet schools draw down reimbursements from $12 million in “carryover funds,” or leftover money from prior budget years. In exchange, the city’s school system withdrew a motion for quick but temporary relief, and both the city and federal education agencies agreed to move forward on a speedy resolution to the case.

Schools Chancellor Melissa Aviles-Ramos confirmed the agreement in a statement after the Daily News published its report.

“In every New York City public school, our young people must feel safe and affirmed — and anything less is unacceptable,” the chancellor wrote. “This funding — which invests in specialized curricula, after-school education and summer learning — is critical to the education of approximately 7,700 young people. Our legal team continues to push to reach a final decision to continue these critical grants as quickly as possible.”

Gender neutral restrooms

A sign marks the entrance to a gender-neutral restroom at the University of Vermont in Burlington, Vt. (Toby Talbot / AP)

Toby Talbot / AP

FILE – A sign marks the entrance to a gender-neutral restroom at the University of Vermont in Burlington, Vt. (Toby Talbot / AP)

The U.S. Education Department confirmed Thursday it would allow the magnet schools to use prior year funds through June, while the Trump administration continues to push for compliance with their interpretation of federal civil rights laws.

The city’s school policies currently allow students to use the bathroom and play on sports teams that correspond with their gender identity, even if that’s different from their sex assigned at birth.

In September, the Trump administration told local schools it would cut off tens of millions of dollars in federal magnet program grants, unless the city agreed to change its policies. The U.S. Education Department followed through on the threat later that month.

The public schools responded with a lawsuit that accused the federal agency of pulling the rug out from under the feet of thousands of students, with the school year already underway.

The move affected 19 magnet schools, according to court documents. The loss of $12 million in carryover funds came on top of another $36 million that had been promised to the city for the remainder of the five-year grant cycle, which the federal lawsuit seeks to reinstate.

Last week, Judge Arun Subramanian ordered the federal government’s lawyers to determine whether the U.S. Education Department would agree to let the city’s magnet schools use leftover money from the prior budget year for the current year, which he said would make moot the city’s request for a preliminary injunction.

Under the subsequent order, the Trump administration must “fully cooperate” with city schools in facilitating the drawdown of carryover funds, court documents said.