OKLAHOMA CITY (AP) — A judge has ruled that the Oklahoma Tax Commission misinterpreted a law when paying schools from motor vehicle collections.

The Journal Record (http://bit.ly/2dinpwe ) reported that eight school districts filed a lawsuit against the commission, arguing that school districts lost more than $2.5 million in a year because the state used the wrong calculations to distribute the money.

The school districts did not ask for the money, which is collected from vehicle registrations and excise tax, but they requested that the court have the commission adopt their interpretation of the law.

Gary Watts, one of the attorneys for the school districts, said the commission should have based the payout on the percentage of collections compared to last year. In 2015, changes to the original version of that law capped the amount of vehicle registration revenue that could be diverted to schools. The commission instead made the payouts based on average daily student attendance.

The OTC asked Oklahoma County District Judge Patricia Parrish to dismiss the lawsuit since not all schools were included as plaintiffs. However, Parrish ruled in favor of the plaintiffs and adopted their interpretation.

The districts represented in the lawsuit are Sand Springs, Midwest City-Del City, Ponca City, Muskogee, Altus, Quapaw, Canton and Lone Wolf.