Renters in Massachusetts multifamily buildings could soon get the right to match a buyer's offer when their landlord sells, under a bill now in a Beacon Hill conference committee.

The Tenant Opportunity to Purchase Act (TOPA) was included in both the House and Senate economic development bond bills this summer, as Commonwealth Beacon first reported. A six-member conference committee is negotiating a single version to send to Gov. Maura Healey. The committee can adopt, change or dismiss the provision entirely.

The bill matters locally. About 13% of Milton's housing units sit in two-to-four-family buildings and about 11% are in buildings with five or more units, according to a Metropolitan Area Planning Council housing assessment based on Census data. Canton also has multifamily rental stock that would fall under the law.

The House and Senate versions differ sharply. The House version, part of H.5562 passed in July, would let any city or town opt in. Landlords would have seven days to notify tenants of a planned sale. Tenants would then get 15 days to form an association and make an offer. After an outside bid comes in, tenants would have 15 to 30 days to match it and up to 160 days to secure financing and close. Owners of six or fewer units in a participating municipality would be exempt.

The Senate version, in S.3178, is narrower. It would create a five-year pilot in just five communities, with the Executive Office of Housing and Livable Communities writing the regulations.

Tenants could also transfer their purchase right to a nonprofit or community land trust.

The bill has drawn sharp opposition from landlord groups. MassLandlords, which represents rental property owners statewide, opposes the policy in all forms. The group argues the extended closing timeline would discourage sales, noting a typical market close takes about 30 days while TOPA could stretch the process past six months.

Rep. David DeCoste, a Norwell Republican, told Commonwealth Beacon the measure "will have a severely detrimental impact on small property owners."

Supporters say the bill would protect housing that is already affordable. Ann Jochnick, a housing attorney with the Massachusetts Law Reform Institute and a member of the roughly 70-organization TOPA Coalition, told Commonwealth Beacon that unsubsidized low-cost rental units make up almost half the state's affordable housing and are disappearing. "We like to say trying to solve the housing crisis without preserving affordable housing is like trying to fill up a bathtub with the drain open," Jochnick said.

Neither Milton nor Canton has indicated whether the town would opt in under the House version. No deadline has been announced for the conference committee to finish its work on the omnibus bill.