“Some of the things that were said were on the hateful side,” Gagliardi said. “It happens often, it’s the Not In My Backyard Syndrome.”

For more than a century, municipalities across the country have crafted zoning ordinances that seek to limit multi-family (read: affordable) housing within city limits. Such policies, known as exclusionary zoning, have led to increased racial and social segregation, which a growing body of work indicates limits educational and employment opportunities for low-income households.

But Massachusetts has a work-around: A state statute, called 40B, allows developers to get around exclusionary zoning and build affordable housing in communities where only a small percentage of units are considered affordable. (A few other states have similar policies.) The statute, passed in 1969 and upheld by the state’s Supreme Judicial Court in 1973, has led to the construction of 1,300 developments throughout the state, containing a total of 34,000 units of affordable housing, according to Citizens’ Housing and Planning Association, or CHAPA.

Projects built under 40B are almost always controversial: The statute was enacted in the first place because most communities outside of big cities didn’t permit multi-family housing, said Ann Verrilli, the director of research at CHAPA. Even with the statute, communities often spend millions of dollars in legal fees to try and stop the projects, Verrilli told me.

“There’s real resistance to change, resistance to development of any kind that may have school-aged kids,” she said.

The experience of developers trying to build affordable housing in Massachusetts takes on added significance now, as housing advocates wait for a decision on a landmark case in front of the Supreme Court that concerns where low-income housing projects are placed. The case, Texas Department of Housing and Community Affairs v. The Inclusive Communities Project, arose when a nonprofit housing group sued Texas, arguing that the state primarily distributed tax credits for low-income housing projects in minority-dominated areas. Inclusive Communities argued that doing so perpetuated segregation and violated the Fair Housing Act, which was passed in 1968 to prevent landlords, municipalities, banks and other housing providers from discriminating on the basis of race. The Supreme Court case centers on whether this discrimination has to be intentional in order to be illegal, or whether the Fair Housing Act also seeks to prevent policies that may not be intentionally discriminatory, but that have a “disparate impact” on minorities.

Housing advocates say the parts of the Fair Housing Act being challenged in this case are important tools in ensuring the country does not become even more deeply segregated. As things are now, few states have policies in place that try and integrate communities or develop affordable housing in so-called “high opportunity” areas. And the process of bringing discrimination claims to court under the Fair Housing Act is a difficult and expensive one. The Supreme Court may yet make it even more difficult to build housing for poorer families in anywhere besides the poorest places.