A dwindling, persecuted tribe – the smokers of Santa Monica – has won a rare victory: the right to light up at home.

The city council has reversed a proposed ban on smoking in all newly-constructed apartments and condominiums, granting an unexpected reprieve to smokers already bound by some of California's toughest restrictions.

Smokers cannot light up in public buildings, parks or, since 2010, within 20ft of any apartment building door, window or vent. Under an ordinance approved two weeks ago new homes would have been added to the list.

Instead, in a second vote on Tuesday night that was needed to make the ordinance law, the same Santa Monica council changed its mind. "What we're simply doing is giving more thought to this," Gleam Davis, a council member, told reporters.

The main reason cited was the implication for people who use medicinal marijuana. "I think the council and the ultimate decision-making will benefit from future discussion regarding medical marijuana," said the mayor, Richard Bloom.

The timing was ironic given that earlier in the day Los Angeles city council, meeting just 15 miles away, voted to ban storefront medical marijuana dispensaries, potentially ending the city's boom in pot shops.

Santa Monica has long taken pride in its image as a bastion of fitness and health fanatics who jog, do yoga and play beach volleyball before snacking on salad. Banishing smokers from their last refuge, home, seemed the next logical step.

The ordinance would have obliged landlords to track and make public where smoking tenants lived. Upon a smoker's departure a unit would have been designated non-smoking, meaning gradually all homes could have become forbidden zones.

Bob Holbrook, a council member who championed the proposal, said opponents had called him a "Nazi" and "Hitler".

It fell at the last hurdle partly over concern for those who use marijuana legally to alleviate pain and stimulate appetite, and partly over a sense the city had already gone far enough.

"Let 'em smoke, Santa Monica," said an LA Times editorial headline. "Smoking may be a nasty habit, but it's not criminal … We understand that city officials want to discourage smoking, a vile and dangerous habit. But the benefits of the proposed ordinance are not sufficient to justify the intrusion into the lives and homes of residents."