MASSACHUSSETTS ATTORNEY General Andrea Campbell is wading into the MBTA communities dust-up, releasing an advisory Wednesday morning emphasizing that participating in the transit-oriented housing policy is not optional and raising the prospect of legal and financial consequences for cities or towns that decide to buck the policy.

“Compliance with the MBTA Communities Zoning Law is not only mandatory, it is an essential tool for the Commonwealth to address its housing crisis along with our climate and transportation goals,” Campbell said in a statement. “While the housing crisis disproportionately affects communities of color and poor, working families, it threatens all of us along with our economy and thus requires all of us do our part, including ensuring adequate development of affordable, transit-oriented housing for our residents and families.”

The Healey administration is tasked with enforcing the late Baker-era zoning law, which requires cities and towns containing or near MBTA commuter rail stations, subway stations, ferry terminals or some bus stations to have at least one zoning district in which multi-family housing is permitted as of right. The zoning districts must be “of reasonable size” and allow as-of-right development of at least 15 housing units per acre.

It is not, state and local officials have noted throughout the law’s early stages, a requirement to actually build any housing – just to zone for it.

According to the state’s MBTA Communities website, only a handful of the 177 impacted communities haven’t submitted initial plans laying out how they expect to comply with the new law. Berkley, Holden, Marshfield, and Middleborough have not submitted the plans, with at least Holden and Middleborough actively objecting to the process.

Middleborough’s town planner, Leeann Bradley, last month criticized what she called a “one-size-fits-all scenario for the different MBTA communities within the state,” which “does not take into account the unique characteristics of each community.”

Served by a commuter rail station, Middleborough is already engaged in affordable housing efforts, the town said.

The attorney general’s advisory gestures at the demographic characteristics of the non-compliant towns, which are all more than 85 percent white. Failure to comply with the requirements may risk liability under federal and state fair housing laws, the attorney general’s office said.

“The Massachusetts Antidiscrimination Law and federal Fair Housing Act prohibit towns and cities from using their zoning power for a discriminatory purpose or with discriminatory effect,” the advisory reads. “An MBTA Community may violate these laws if, for example, its zoning restrictions have the effect of unfairly limiting housing opportunities for families with children, individuals who receive housing subsidies, people of color, people with disabilities, or other protected groups. “

Housing organizations and civil rights groups expressed support for the AG’s statement. Some, like Lawyers for Civil Rights, had already been eying some sort of legal action against the non-compliant towns.

“Greater Boston is mired in an affordable housing crisis that harms Commonwealth households of all incomes and backgrounds, but particularly low-income households of color,” Iván Espinoza-Madrigal, executive director of Lawyers for Civil Rights, said in a statement. “Municipal compliance with the MBTA Communities Law is critical to begin combatting that crisis.”

The state has also raised financial potential penalties for non-compliance. Municipalities could lose access to housing grants through programs like MassWorks and Mass Save.

At a visioning session for the town of Arlington last week, in which residents contributed ideas and laid out priorities for their local MBTA zoning requirements, planners said the financial stakes for non-compliance are significant and could also impact the town’s ability to participate in a clean energy pilot next fall.

“There are a lot of great incentives here – programs it would be unfortunate and difficult for us not to participate in,” said Claire Ricker, the town’s director of planning and community development.

The state’s Executive Office of Housing and Economic Development is evaluating the roughly 170 submitted interim planning documents, which merely state how the towns and cities expect to meet deadlines over the next two years. For rapid transit communities, which are served directly by subway systems, a full plan is due by the end of 2023. Commuter rail municipalities and “adjacent communities” have until the end of 2024, and “adjacent small towns” another year after that.

Campbell’s office seems to be in lockstep with Gov. Maura Healey’s messaging. The governor and former attorney general last month said “opting out is not an option” and pledged to deploy “carrots and sticks” to get cities and towns on board.

It wasn’t all sticks in the AG’s advisory. In a statement, the office highlighted available assistance with municipalities working to meet those deadlines, through the Massachusetts Housing Partnership, technical assistance through the Department of Housing and Community Development, and the Citizens’ Housing and Planning Association (CHAPA).

“This is an ambitious undertaking, but the MBTA Communities law will help localities remove significant regulatory barriers to housing development,” said Karina Oliver-Milchman, chief of housing and neighborhood development at the Metropolitan Area Planning Council. “There’s enough flexibility in the guidelines and technical assistance available for municipalities to draft compliant zoning that also enhances neighborhoods.”