Electronic cigarettes are set to be banned from bars and restaurants in New York City, after the New York City Council voted 43-8 Thursday to add the devices to a 2002 law prohibiting smoking in certain public spaces.

The bill, which passed in the final City Council meeting of the year Thursday, underscores New York’s role in pushing for some of the toughest anti-smoking legislation in the country. Its passage was hailed as an important victory by health officials and advocates, who say e-cigarettes, which give off vaporized nicotine instead of smoke, are harmful.

American Lung Association of the Northeast CEO Jeff Seyler called the ban “a common sense step forward,” and said it would help protect people from secondhand exposure.

“We’re grateful that New Yorkers will not be exposed to potentially unsafe secondhand emissions from electronic cigarettes,” Mr. Seyler said in a statement Thursday.

The ban is almost certain be signed into law by New York City Mayor Michael Bloomberg, who championed the landmark 2002 Smoke-Free Air Act that barred New Yorkers from lighting up in indoor public spaces, and has said he supports the legislation adding e-cigarettes to the ban as well.

City Council Speaker Christine Quinn, in her final press conference as Speaker Thursday, called the Smoke-Free Air Act “one of our greatest accomplishments.”

Makers of e-cigarettes, facing other potential bans in Los Angeles and Chicago, said they were disappointed. Miguel Martin, the president of Logic Technology, one of the country’s largest e-cigarette manufacturers, said New York’s push to add them to the ban was not based in science.

“It’s really unfortunate. I find their line of reasoning flawed,” Mr. Martin said in a phone interview. “It’s not based on science and there’s no foundation for this.”

Gregory Conley, a legislative consultant and e-cigarette advocate who was sitting in City Council chambers when the bill passed, said the devices should be treated as markedly different from traditional cigarettes. “Banning something because it looks like smoking is not rational health policy,” he said.

The e-cigarette ban will go into effect 120 days after it is signed by the mayor.

But e-cigarette makers also could challenge the ban in court, something beverage companies did to successfully halt a planned cap on sugary drinks.

Two other bills passed unanimously. One bans foam dining containers from restaurants and stores in New York City. The other creates a public online database to track the delivery of federal aid money from superstorm Sandy relief.