Craig Gurian represents two African-American women suing the city, saying the lottery for filling city-subsidized housing is discriminatory.

"We're supposed to be saying that all of our neighborhoods are for everyone, and instead the city has been pandering to those who would like to retain the segregated status quo," said Gurian.

That’s what a sociologist found in a study commissioned by the plaintiffs.

Queens College's Andrew Beveridge analyzed 7.2 million applications for more than 10,000 affordable housing units awarded through the lottery system from 2012 to 2017.

He found the city’s policy of generally reserving half the apartments for people living near each development, “Imposes a sorting process that would not otherwise exist and does so in a pattern that causes material disparities by race and ethnicity.”

"That's just fundamentally unfair," said Gurian.

The study found that the lottery, in effect, made white communities whiter, Hispanic areas more Hispanic, and black communities even more African-American.

The city's Housing, Preservation and Development Commissioner Louise Carroll disputes the study, though.

"The people who live in our housing are a majority people of color, even in neighborhoods with predominately white residents," said Carroll.

She says the policy of reserving some affordable housing units for local residents aims to keep people from being priced out of their neighborhoods.

"Our policy is not about discrimination,” Carroll said. “It's not about disparate impact … We're hearing from New Yorkers in all the five boroughs that they would like an opportunity to have housing that they can afford where they live.”

The lawsuit filed two years ago wants a judge to eliminate the policy of giving local residents preference for the coveted affordable apartments.

The plaintiffs' attorney says he'll seek a summary judgment in the fall.