DOVER, N.H. — A judge ruled Tuesday that the city of Dover, New Hampshire, is getting $1.5 million in its lawsuit against the state over education funding.

The lawsuit filed last year argued that the state’s annual cap on “adequacy funding” aid to school districts on a per-pupil basis shortchanges Dover students and violates principles of the state constitution. It asked a judge to rule that the state law capping adequacy grants is unconstitutional and requested the city’s full share of funding, plus reimbursement for missed payments over the last six years.

The state attorney general’s office agreed the cap is unconstitutional, but said the back pay never existed. The judge denied the request for past money lost.

Foster’s Daily Democrat reports ( Judge Brian Tucker’s decision is subject to an appeal from legislative leaders, who were named interveners in the case.

Gov. Maggie Hassan said in a statement Tuesday that the court’s decision “reaffirms the validity of concerns raised by communities about school funding levels as well as the Attorney General’s original determination.”

Andru Volinsky, a lawyer representing the city, said as part of the ruling, 40 other communities throughout New Hampshire are entitled to money lost in fiscal year 2016 as a result of the cap, totaling about $11 million.