A battle over school safety erupted Thursday after an advocacy group highlighted numbers suggesting that city schools are more violent than they've been in a decade, despite the mayor's claims that they're safer than ever. Our education reporter Lindsey Christ explains.

Violent incidents in public schools are way up — by 23 percent last year — and assaults that led to a serious injury surged by 50 percent.

At least according to data reported by school principals and recorded by the state.

But on Thursday, Mayor Bill de Blasio painted a far different picture.

"In the schools, we have reduced crime overall," he said. "We have reduced violent incidents overall, while reducing the inappropriate use of suspension."

De Blasio has repeatedly boasted that public schools are safer than ever.

He cities NYPD numbers showing that police officers and school safety officers responded a record-low 6,900 times to incidents in city schools last year.

But a different set of numbers is kept by the state — incidents of violence reported by principals, including forcible sex, assault, and weapons use.

That measure spiked to nearly 16,000 last year, the most in a decade.

The disparity between the numbers was highlighted Thursday in a report by the advocacy group Families for Excellent Schools, a vocal de Blasio critic.

"In a world where violent incidents — not spin, but the literal counted number — is up by 23 percent," said Jeremiah Kittredge, the executive director of the advocacy group. "To say in the State of the City Address that violence in our schools is down 29 percent is certainly misleading at best."

De Blasio dismissed the report.

"I have learned long ago not to pay too much attention to statistics from that organization that clearly has a bone to pick," the mayor said about Families for Excellent Schools.

For at least the past decade, the state and city have calculated the school violence rate differently, but the gap is now significantly wider than ever before.

Officials could not explain why the two numbers moved in the opposite direction.

Parents who belong to the advocacy group say they want to know: Are the schools safer, or not?

"They should be very transparent to parents all over the city what is really going on," one parent said.

This new report adds a new element to the debate about whether metal detectors should be removed from some schools, as the mayor says he plans to do.