It’s a law that’s sure to get people fired up.

The Erie County Legislature unanimously passed a law Thursday to ban smoking in personal vehicles if any of the passengers are under the age of 18. The law applies to traditional cigarettes as well as other tobacco products like electronic cigarettes.

It's welcomed news for the county's health commissioner.

"We're actually celebrating because this is going to enable our community to become so much healthier because we know that tobacco products, including electronic nicotine devices, really contribute to the cancers and illnesses in our community," said Erie County Health Commissioner Gale Burstein.

Violating the Public Health Protection Act once will result in a $50 fine. The bill goes up to $100 for a second offense and $150 for a third. There will be a 90-day-grace period once the law goes into effect, although it's not clear yet how police will enforce it.

"It ensures that children who can't speak for themselves, who have no other voice, are not unknowingly or knowingly subjected to the dangers of second-hand smoke," said Erie County Legislature Chairman Peter Savage III.

Another part of the law bans people from smoking in bus shelters or in public spaces next to them.  The same fines and a 90-day warning period apply. 

The new law also prohibits pharmacies from selling any tobacco or e-cigarette products.  The county health department will conduct checks and could issue fines to violators.

"We are making sure that pharmacies, which are places that sell health care products, are not selling tobacco products because that is really giving the wrong message," Burstein said.

Erie County Legislature Minority Leader Joseph Lorigo voted for the law but admits he has an issue with the pharmacy sales ban.

"I think that disproportionately hurts people in the inner cities as well as business owners in border towns such as many of the towns I represent," Lorigo said.

Some people asked about the law — smokers and non-smokers — said this law is a case of government overreaching and stepping on their freedoms.

 Savage, however, believes this measure achieves an overall goal of promoting community health.

"We recognize that the product is legal. We recognize that people chose to smoke and they have every right to do so. But we also recognize that there should be some restriction that protects children, that protects the public," he said.

So when does this law go into effect? There's no firm date yet, but County Executive Mark Poloncarz is expected to sign it possibly as soon as next week, and then it's filed with the Secretary of State before it’s officially on the books.