MADISON, Wis. β€” Wisconsin's education department said Wednesday that it will change its policy and allow private schools to count online classes toward instructional time, just as public schools can do, after a judge ruled that treating them differently was unconstitutional.

The ruling Tuesday by Waukesha County Circuit Judge Michael Bohren was a win for School Choice Wisconsin Action, a group that includes private schools in the state's choice program and advocates for them.

The lawsuit filed last year alleged that the Wisconsin Department of Public Instruction was wrong to allow public schools, but not choice schools, to count online learning hours toward the minimum number of instructional hours required each year.

In an email sent in February 2019 to attorneys for choice schools, the department's attorney said state law would have to be changed to give the department the authority to count online classes at choice schools.

But after the judge's ruling, the education department said in a statement it would be changing its policy.

"Prior to this lawsuit, the (education department) believed the law did not authorize choice schools to utilize virtual instruction," the agency said in a statement. "Now that the court has determined it does, we will comply with the ruling."

The judge ruled that the education department can't legally justify treating choice and public schools differently when it comes to counting online classes. Bohren said in his order that not treating choice and public schools the same on this issue violates constitutional equal rights of choice schools.

"There is not a legitimate government interest in denying choice schools the opportunity to use 'virtual learning' as public schools do," the judge wrote in his ruling. "The denial is harmful to the choice schools and its students."

Libby Sobic, director of education policy at the Wisconsin Institute for Law and Liberty law firm that represented the choice schools, hailed the ruling.

"For too long, (the education department) has been unfair in their treatment of private schools in Wisconsin's choice programs, and today's decision affirms that when they break the law, they will be held accountable," she said in a statement.

Public and choice schools must provide 1,050 hours of "direct pupil instruction" in any given year for students in grades 1 through 6. The requirement is 1,137 hours for grades 7 through 12. That becomes a challenge for districts in years when many schools closed due to snow and cold weather.

Schools looking to get creative in making up the lost hours turned toward offering instruction over the internet. Last year, in the face of many snow days, various private schools in the choice program asked the education department if they could offer online classes to satisfy the hourly instructional requirement.

The department denied the request. But it had no legal authority to do that and there is no harm in allowing choice schools to count online classes, the judge said.

Not allowing it "removes a legitimate teaching technique from the choice schools, available to the public schools," Bohren said.