(CNN)Smoking is set to be banned in San Francisco apartments, with one exception: weed.
The San Francisco Board of Supervisors voted 10-1 Tuesday to ban smoking tobacco in apartments, but made an exception for cannabis.
The ordinance is an effort to protect residents from secondhand smoke. With its passage, smoking is prohibited inside buildings with three or more apartment units and in all common areas. But medical weed and "adult-use" weed are allowed, the ordinance states. Violators could face a $1,000 fine.
Smoking is already illegal in common spaces but this ordinance extends to inside apartments and condominiums.
Supervisor Norman Yee, who wrote the legislation, tweeted his gratitude to colleagues "for their support."
"Secondhand smoke causes harm & everyone should have clean air to breathe where they live," he wrote.
The board will hear a second reading next week, before the ordinance goes to Mayor London Breed's desk. If she signs it, the law will go into effect 30 days later.