A judge has dismissed a Chicago Public Schools lawsuit that sought to have the state's funding formula declared discriminatory and unconstitutional.

DNAinfo Chicago reports that the ruling a decision could mean that the school year for the financially strapped district's 380,000 students could end as much as three weeks early.

Associate Cook County Circuit Court Judge Franklin Valderrama denied the school district's motion seeking an injunction against the state of Illinois, and granted the state's motion to dismiss the suit. The school system is allowed to refile the suit with an amended complaint if it wishes, the judge said.

School district officials have said they might have to close schools on June 1 if the district doesn't get more money. The judge's decision means the schools will have to rely on the state to provide more money — or make even more cuts.

After the ruling, district CEO Forrest Claypool didn't say what action the district will take. Officials have said they will decide by May whether to close early.

The district had argued in its lawsuit that the civil rights of Chicago students have been violated because the state gives more funding to other districts.

The Chicago system serves 20 percent of the state's students, many of them black or Latino, its lawyers said, but receive only 15 percent of the funding the state distributes to districts statewide.

The state's approach to funding has resulted in a $500 million shortfall for Chicago, Claypool has argued.

Lawyers for the state argued it can't be sued for discrimination, and said the lawsuit could harm schools statewide.

Chicago Public Schools would save $91 million by ending the school year early, according to the district's court filing, but it would lose $58.5 million in state aid next year because of the shortened calendar.