Any pharmacy retailer or health care institution that sells tobacco and e-cigarette products after the 90-day grace period will be fined $300 to $1,000 for a first offense and $500 to $2,000 for repeat offenses.

"Any kind of legal action that limits the sales of any kind of nicotine-containing products, including at pharmacy retailers, we know is going to result in some kind of decrease in use by adults, and more importantly in youth," Burstein said.

Some legislators called the pharmacy retailer ban an example of government overreach.

"I take issue with telling private businesses that they cannot sell something that is legal," said Minority Leader Joseph Lorigo, D-West Seneca.

But Legislature Chairman Peter Savage, D-Buffalo, said there's no comparing the sale of cigarettes to alcohol and candy.

"There is no such thing as 'responsible' smoking," said Savage, a co-sponsor of the law.

It is unclear how much of an effect the new law will have on pharmacy retailers. Stores like Target, CVS and Wegmans have voluntarily given up the sale of these products. And even drugstores that sell cigarettes do so less conspicuously, often selling cigarettes alongside rows of anti-smoking aids.