J.T. Scott, a city councilor who supported the move, said he believed it was the first such municipal ordinance in the country.

“People have been living in families that include more than two adults forever,” Mr. Scott said. “Here in Somerville, families sometimes look like one man and one woman, but sometimes it looks like two people everyone on the block thinks are sisters because they’ve lived together forever, or sometimes it’s an aunt and an uncle, or an aunt and two uncles, raising two kids.”

He said he knew of at least two dozen polyamorous households in Somerville, which has a population of about 80,000.

“This is simply allowing that change, allowing people to say, ‘This is my partner and this is my other partner,’” he said. “It has a legal bearing, so when one of them is sick, they can both go to the hospital.”