It wasn’t that long ago that many Marin towns were cracking down on so-called second units, typically rooms or secondary dwellings for rent that residents in single-family neighborhoods found intrusive.

Some towns had bans written into their ordinances.

Others, such as Mill Valley, encouraged them — in the right places — as a way to produce affordable housing and meet the state’s housing quota.

Today, secondary dwellings are gaining popularity, not only as a way for municipalities to meet their regional fair-share housing quotas, but as a way for property owners to be able to afford to buy and stay in high-priced Marin.

For instance, the Marin County Commission on Aging has launched an initiative to help property owners convert extra rooms into rentals, called “junior accessory dwelling units.” In 2017, in response to the state housing crisis, Sacramento lawmakers passed laws streamlining the approval process for these units.

For senior homeowners living on fixed incomes but facing rising prices and taxes, a second unit can bring in $1,200 to $1,600 per month in rent, according to Linda Jackson, a former city planner working with the commission.

By state law, a junior unit is no larger than 500 square feet and attached to a single-family home. It requires an outside entrance, a mini-kitchen and its own restroom, or access to a shared bathroom.

At local forums put on by the commission, architects, builders and planners were on hand to help answer attendees’ questions.

“This is the perfect solution to making more affordable housing available,” said Michael Haggerty, a commission member.

The possible benefits are clear, both to property owners, to those who need affordable housing and to municipalities.

And many communities that once banned second units have relaxed their rules.

Perhaps the biggest complaint about second units has been about parking. That same complaint is often heard regarding rental homes, where because of the cost, more tenants are needed to split the rent.

Most Marin towns are facing the challenge of trying to meet state housing quotas while also having few potential building sites available. Most of Marin’s undeveloped acreage is federal, state and local parkland.

Some towns, however, have also shown little realistic effort toward doing their fair share, which has led state lawmakers to push for housing construction bills to bypass or minimize local political opposition.

Marin has been cited repeatedly in Sacramento as a prime example of restrictive zoning and political opposition that have driven up real estate values and forced working families to move out of the county and into longer commutes.

Junior units could be an answer for many communities. By helping property owners — especially seniors with “empty nest” homes — get started with answers rather than obstacles, the aging commission has done a terrific public service.