New York State erroneously directed too much federal funding to charter schools at the expense of traditional district schools, officials said Friday.

The state overpaid 275 charter schools and three school districts with federal Title II funds, which are used for teacher training.

This resulted in 677 school districts receiving less money than they should have. In all, $12 million was misallocated, mostly to charter schools, representing 7.8 percent of Title II funding directed by the state. (The state receives about $1.6 billion in education funding from the federal government.)

Charter schools that were overpaid will not be forced to return the funds, but instead will receive less Title II funding in the future, officials said. District schools that were underpaid will receive slightly more funding in the future to make up for the gap.

“This is our error and we own it,” State Education Commissioner MaryEllen Elia told reporters Friday.

New York City district schools collectively received about $7 million less than they should have, a tiny fraction of the city’s $31 billion education budget. The money will be repaid to city district schools over four years, Elia said, though 99 percent of districts across the state will be repaid within a year. A number of city charter networks — including Achievement First, Democracy Prep, and Success Academy — will receive slightly less funding to offset the overpayments they received.

Achievement First Brownsville, for instance, received about $167,000 in Title II funds, nearly $100,000 more than what the school was owed.

Officials said the error was made roughly a year ago after the federal government changed its Title II funding formula, which was then misapplied by the state’s education department. The mistake was discovered a few weeks ago, according to Elia, who emphasized that “schools did receive the vast majority of their allocated funds last year.”

Schools are unlikely to feel a budget crunch as a result of the snafu because a separate federal funding stream for student enrichment, known as Title IV, is set to rise this year, Elia said. In New York City, the district will receive just over $47 million in new money through that program next school year.

Some charter school critics jumped on the news to criticize the state’s education department, although no evidence has surfaced that would suggest officials intentionally shortchanged school districts in favor of charter schools.

Elia said the state is taking steps to “ensure it does not happen again.” You can find a full breakdown of which schools and districts were under- or overpaid here.