The Boston Zoning Commission set a limit of four yesterday on the number of college students who can live together off campus, a far-reaching decision that could spur a citywide crackdown on crowded student housing.

Some students and property owners condemned the sweeping measure, arguing that it further burdens already cash-strapped students and may force many into more expensive college dormitories.

But proponents - an unusual coalition of neighborhood groups, college officials, and city leaders - said the new occupancy limit will reduce the number of rowdy late-night parties on otherwise quiet residential streets.

Because the measure will make it harder for students to live off campus, it will slow their influx into residential neighborhoods, chiefly Mission Hill, Brighton, and the Fenway, they said. Students who crowd into high-rent apartments, they contend, have driven up housing costs and displaced many working- and middle-class families.

"You look at these neighborhoods that were all families, and now you can count them on one hand," said state Representative Jeffrey Sanchez, who represents Mission Hill. Students from nearby Northeastern University have "essentially eradicated the family housing" in neighborhoods near the school, he said at a morning hearing at City Hall that drew more than 150 people.

The zoning change, passed unanimously by the City Council in December and backed strongly by Mayor Thomas M. Menino, has broad ramifications for the estimated 13,000 college students who live off campus in Boston, for the overall rental housing market, and for relations between colleges and their neighbors.

The Zoning Commission's unanimous approval was the final step for the measure, which needs the mayor's signature and could take effect within days, barring legal challenges. Enforcement of the law would be driven by neighborhood complaints, city officials said.

"As with other zoning violations, the Inspectional Services Department will develop an enforcement strategy to respond to any property owners reported or found to be in violation of the code," Dorothy Joyce, the mayor's press secretary, said in a written statement. "We will work with local colleges and universities to educate students and property owners about the new zoning. As [with] all zoning, we expect all property owners to adhere to the letter of the law."

Officials have not determined the specifics of enforcement, including possible fines.

Councilor Michael Ross, who sponsored the regulation, said that other municipalities - including Newark, Del., Bloomsburg, Penn., and Bowling Green, Ohio - had adopted similar zoning restrictions targeting college students and that courts have upheld the restrictions.

He estimated that at least 5,000 housing units would be affected in Boston.

Residents from across the city told the commission that homes with large groups of students were frequently disruptive, hosting raucous parties deep into the night.

"We were convinced the student population gets much harder to handle when it gets larger than four people," said commission chairman Robert Fondren. "I don't think anyone thinks it's malicious, but sometimes it gets out of control. It's clearly a problem, and I think this is worth a try."

Opponents, many of them property owners and college students, said the occupancy limit violates their property rights and, by focusing just on students and not other large groups of renters, unfairly singles out specific people.

"This is a back-door form of rent control," said Stephen Greenbaum, a Boston lawyer specializing in real estate and land use, who spoke against the proposal at yesterday's hearing. "You can't simply single out a particular group and say they can't live together. This will not only not stand up to a legal test, but is also patently unfair."

Some property owners denounced the plan as unenforceable and said it would backfire by deepening a housing shortage that would drive up rents.

They urged the city to focus on enforcing other occupancy codes and on cracking down on absentee landlords, rather than restricting their property rights and ability to turn a profit.

"If you reduce my five-bedroom to four, I'll just raise the rent to what I would have gotten," said Greg Hummel, a Brighton property owner. "And if students can't afford it, do you think the Starbucks crowd will pay any less?"

The measure changes how the zoning code defines a family, to prevent five or more unrelated, full-time students from living together. Larger groups can live together, as long as they are not students.

The new law is designed to discourage landlords from turning single- and two-family dwellings into high-rent, multibedroom apartments for large numbers of students, Ross and other supporters said.

"You can't let profit dominate the public debate," he said.

The new law returns the city's policy on off-campus student housing to the provision in effect in 2003, when a Boston court overturned a similar restriction.

At yesterday's hearing, Boston police Captain William Evans said he had seen how large groups of students living together often hurt residents' quality of life.

"We dread September and October in the Fenway and Allston-Brighton area," he said. "It's a tremendous drain on our resources. Nothing bothers me more than hearing people are fed up and fleeing the city."

Several college officials said the move would help combat the growing problem of students in groups as large as 12 living in housing poorly maintained by absentee landlords.

"It's a disgrace, and it's very dangerous," said Sandra Pascal, associate vice president of community affairs at Wentworth Institute of Technology.

Jeffrey Doggett - director of government relations and community affairs at Northeastern University, which is building a 1,200-student dormitory at Ruggles and Tremont streets - said the proliferation of students living together in large numbers on residential streets has reached a tipping point.

"We think it's critical this happen now," he said. "We've waited too long for this, and it's in the best interests of both the neighborhood and the students."

Property owners said they believed that colleges supported the plan in order to steer students toward their dormitories.

Students said that the restriction infringed on their rights and that they needed many roommates to afford to live in an expensive city.

(A sampling of colleges in Boston - including Boston, Northeastern, and Suffolk universities, Boston and Emerson colleges, and Wentworth Institute of Technology - found room and board typically costs at least $10,000 this academic year. In Boston, four-bedroom apartments can be found for under $3,000 a month.)

"If you took out the phrase college student and insert [an ethnic group], it would be a clear civil rights violation," said Jon Phoenix, a Northeastern University freshman. "There shouldn't be anything wrong with five friends wanting to live together."

Some students, such as Allison Pyburn, a recent Suffolk graduate who just signed a lease to live with four Simmons undergraduates in the Fenway, said the new law would make it harder for students to make ends meet.