The Portland City Council voted 7-2 Monday to become one of more than 200 communities in the United States to require a portion of housing units in new developments to be affordable to middle-income earners.

The new rule requires that 10 percent of the housing units in new developments of 10 units or more be affordable to middle-income earners – for example, a family of four earning 100 percent to 120 percent of the area’s median income, $77,500 to $96,875 a year.

Known as inclusionary zoning, the rule was supported by Mayor Michael Brennan and several councilors, but opposed by the Planning Board and developers, who said it will backfire by chilling investment in much-needed housing.

Councilor Kevin Donoghue, who has been advocating for such rules for more than a decade, said the council has tried to encourage development with incentives, and the time has come to establish a mandate. He noted that if the Portland Co. complex redevelopment moves forward with 400 units of housing, at least 40 of those units will be set aside for middle-income earners.

“If this is a radical solution, I don’t know what to say to that,” Donoghue said. “I have to say this is a very modest proposal. I think it will make a difference.”

Councilor David Brenerman said he doesn’t believe it is the city’s role to impose a mandate on developers who don’t seek any special assistance from the city. He suggested that the current housing boom could be fragile and short-lived, and that any unnecessary regulation could stop it.

“We’ve just begun to see construction in the last couple years of market-rate housing in Portland, and any economic downturn, in my view, would end that,” he said. “This is an experiment that has not proven to make a marked difference on the construction of market-rate units.”

Edward Suslovic joined Brenerman in opposing the measure.

Developers can receive incentives to offset the costs of inclusionary zoning, such as increased heights and density, and be eligible for tax breaks. They also can avoid the new requirement by paying the city $100,000 for every affordable unit they don’t build.

While supportive of incentives, Planning Board Chairwoman Elizabeth Boepple said the board recommended against the mandate out of fear that the development “bubble” will burst with an aggressive approach. She said 862 new housing units have been approved, are under review or are being built. The city should see what impact that has on rents, she said.

“That is a lot of additional residential units coming into the city,” she said. “There’s an opportunity here to see if the market-rate housing will provide what is needed for workforce housing before we take the next step of inclusionary zoning.”

Several people spoke against the proposal while saying they consider it well-intentioned. Some feared it would increase market-rate rents and have the unintended consequence of encouraging less housing.

Advocates for the homeless said the income thresholds are too high.

William Higgins, advocate for Homeless Voices for Justice, said the group, which is composed of formerly homeless people, agrees with the intent of the ordinance. But he was concerned that social workers and teachers, among others, would not be able to afford those housing units.

“We have great concern about how the city is defining affordable,” he said. “When we say something is affordable, it needs to be affordable to everyone.”

Ron Gan of Washington Avenue said the development of open lots needs to happen off the peninsula, and the city doesn’t need ordinances aimed at the downtown.

“This idea you have here is going to fail,” he said. “It looks like you guys are always trying to cram it onto the peninsula. It just can’t happen. The land is too expensive and the sites are too challenging.”

The city is seeing steady development of both low-income (80 percent or less of the area’s median income, or below $60,000 for a family of four) and luxury housing, with little in between. A report by the Greater Portland Council of Governments released in January noted that middle-income earners are increasingly finding the city an unaffordable place to live.

Spending 30 percent or less of household income is generally considered affordable, according to the city.

The council of governments found a median rent of $1,183 month – about $270 more than what is affordable. The group predicted that by 2030, the demand for workforce housing will exceed the supply by 24 percent to 33 percent.

From May 2014 to May 2015, Portland rents rose by 17.4 percent, the second highest increase among the country’s 100 largest metropolitan areas, according to the real estate data firm Zillow. Nationally, rents increased 4.3 percent.

This story was updated at 9:30 a.m. Tuesday to correct the number of new housing units approved in the city.