A new federal lawsuit seeking class-action status labels the Chicago Police Department’s gang database unconstitutional, discriminatory and riddled with errors.

Chicagoans for an End to the Gang Database filed the lawsuit Tuesday. The group describes itself as a coalition dedicated to expanding “what it means to be a ‘sanctuary city'” to include immigrants and minorities targeted by the police.

Also listed as plaintiffs are individuals who say they have been harmed by their inclusion in CPD’s gang database. The lawsuit names the city of Chicago, Police Supt. Eddie Johnson and other officers as defendants.

The city’s law department declined to comment on the lawsuit, which was filed by Northwestern University’s MacArthur Justice Center. But Johnson addressed the controversy after a police graduation ceremony at Navy Pier.

“Our mission is to keep this city safe,” Johnson said. “So, we have an obligation, a responsibility to know who the drivers of violence [are] in this city. It would be irresponsible for us to not know that. But at the same time, it’s our mission if we’re gonna have things of that nature, to get it right.”

“We’ve been working for the last six months on a policy that addresses that,” Johnson continued. “It’ll be coming out in the next few days. I encourage you, when you see it, come out, give us your feedback and tell us what you think. Because it’s about getting it right and keeping this city safe.”

The gang database lists more than 128,000 adults, according to the lawsuit. Of those, 70 percent are black, 25 percent are Latino and less than 5 percent are white. The lawsuit alleges CPD officers are given “unlimited discretion” to add to the list.

Though the number of juveniles in the database is unconfirmed, the lawsuit estimates there are between 28,000 and 68,000 of them.

Meanwhile, it says less than 1,100 people are listed as members of historically white gangs, “and many of the people listed as members of these gangs are people of color.”

The database leaves out the Chicago Outfit and biker gangs like the Outlaws, according to the lawsuit. And it contains only 23 white supremacists.

Two people in the database are allegedly listed as 132 years old, and 13 are listed as 118 years old — “clear errors,” according to the lawsuit.

During the tenure of former Police Supt. Philip Cline more than 17,000 people were added to CPD’s gang database, it alleges. Then, another 75,000 were added after 2012, beginning with the leadership of former Supt. Garry McCarthy.

There is no notice or opportunity to contest the gang designation, which lasts forever, the lawsuit alleges. CPD uses the database “to harass, falsely arrest, and falsely imprison” people, it claims.

The database allegedly caused people to lose jobs and licenses, to be prioritized for deportation, to be targeted for police harassment, and to lose out on a public education and parental rights.