A Massachusetts think-tank on Thursday released a report that says zoning rules that require the inclusion of affordable housing units are needed to prevent “housing segregation” in cities undergoing development booms.

However, the report, released by the Lincoln Institute of Land Policy, says those rules — often referred to as inclusionary zoning — need to be carefully drafted to survive a court challenge. It also says cities must follow-up with developers to ensure that housing remains affordable after such ordinances are adopted.

“In hot-market cities, skyrocketing housing prices push middle class and low income residents far away from well-paying jobs, reliable transportation, good schools and safe neighborhoods,” said Lincoln Institute President George W. “Mac” McCarthy. “Inclusionary housing alone will not solve our housing crisis, but it is one of the few bulwarks we have against the effects of gentrification—and, only if we preserve the units that we work so hard to create.”

More than 500 communities have adopted inclusionary zoning ordinances, according to the Lincoln Institute of Land Policy, which bills itself as the leading resource concerning use, regulation and taxation of land. The city of Portland is now considering such an ordinance in the face of rapidly rising rents, and opponents have argued that it could backfire by slowing investment in needed housing development..

The institute’s report, “Inclusionary Housing: Creating and Maintaining Equitable Communities,” says that such ordinances can be adopted while avoiding negative economic impacts and legal challenges by offering incentives, such as building at greater densities.

The report, which looked at case studies throughout the U.S., claims that inclusionary zoning rules don’t drive up market-rate prices citywide, but an ill-conceived ordinance could discourage development.

“It is entirely reasonable to ask real estate developers to help address the pressing need for more affordable housing, because developers and landowners benefit financially from the conditions that give rise to the shortage of decent, well-located homes for lower-income residents,” the report states. “But inclusionary programs need to be designed with care to ensure that their requirements are economically feasible.”

After more than a decade of stagnant development, Portland is experiencing a wave of market rate housing projects, especially downtown, as well several projects that are intended to accommodate low-income families. That is pushing many middle class families out of the city, according to a recent report by the Greater Portland Council of Governments.

A strong demand for housing in Maine’s largest and arguably most progressive city coupled with a limited housing supply is driving up rents faster than most U.S. communities. Rents jumped 17.4 percent from May 2014 to May 2015 — the second highest rate in the country behind Jackson, Mississippi, according to the real estate data firm Zillow.

To address the shortage of middle-class housing options, the city has deliberately sought proposals for so-called workforce housing on a city-owned site in the Bayside neighborhood.

The City Council is also considering adopting an inclusionary zoning ordinance. Even though the proposed ordinance received a negative recommendation from the Planning Board, several councilors continue to support the proposal, which they will take up at a meeting in October.

The ordinance has faced opposition from the Portland Community Chamber of Commerce and private developers, who warn about unintended consequences. They argue that requiring developments to include affordable units will inevitably drive up the prices of the remaining market-rate units.

As proposed, the ordinance would require developments with 10 units or more to set aside at least 10 percent of the units for people making 100-120 percent of the area median income or lower. Currently, that threshold is $77,500 to $96,875 for a family of four, according to the city.

Developers that comply would be eligible for a 25 percent increase in housing density and be considered for local tax credits.

The developer could get around that requirement by paying $100,000 per unit into the city’s Housing Trust fund.

The Lincoln Institutes’s report also found that: rapid construction of market rate housing actually fuels the need for more affordable housing; successful policies have been built with input from both private development and public officials; flexibility and incentives are needed; inclusionary zoning ordinances have been challenged in court and can be designed to minimize legal risk; follow-up enforcement and stewardship are needed.

The Lincoln Institute of Land Policy was founded in 1946 by John C. Lincoln, a Cleveland industrialist and investor who admired the writings of Henry George, a late 19th century economic philosopher who advocated for a single tax on unimproved land to fund all governmental operations, while abolishing all other taxes as a way of achieve economic equality and social justice.