Smoky barrooms and hazy casino floors are set to become history in New Orleans with the City Council’s unanimous passage Thursday of an ban on indoor smoking and use of electronic cigarettes that backers described as a way to protect service industry workers and musicians from the dangers of secondhand smoke.

The occasionally tense and emotional two-hour discussion was the culmination of weeks of debate that has pitted business owners against public health advocates in a fierce fight over whether and how to extend existing regulations on smoking.

Supporters of the ban, many of whom wore the light blue shirts of the Smokefree NOLA campaign, burst into loud applause after the 7-0 vote.

The new rules will go into effect 90 days after the ordinance is formally adopted, which would come when Mayor Mitch Landrieu — who has generally supported the ban — signs it or allows 10 days to pass without taking action. The mayor also could veto the measure.

Councilwoman LaToya Cantrell, who has championed the prohibitions, cast the ordinance as a step away from a city and state culture that is not concerned about its most vulnerable citizens and said it was in keeping with other city efforts to improve the lives of its poorest citizens and to provide for a healthier and safer city.

“When we talk about Nola4Life, this is Nola for life,” Cantrell said, playing off the name of the city’s initiative to reduce murders.

The council’s final unanimity came despite a sharp divide during the meeting on exactly how extensive the ban should be and in the face of lingering concerns from some council members over its effects on the city’s vital hospitality industry.

Cantrell’s proposal would have banned smoking and vaping — using e-cigarettes — not just inside bars and casinos but also for 5 feet around their entrances. It also would have barred the same activities in public parks and events and in other venues such as outdoor shopping malls.

Council members chipped away at those provisions throughout the meeting with a series of amendments that reduced the scope of the ban and altered the way it will be enforced.

Many of the amendments were pushed by a bloc consisting of council members Jason Williams, James Gray, Nadine Ramsey and Jared Brossett over the objections of Cantrell, council President Stacy Head and Councilwoman Susan Guidry.

In the end, the new ban largely extends a 2007 state law that prohibits smoking in restaurants and most workplaces to bars and casinos, which have been exempt. Smoking in public areas like streets and parks will still be allowed, as will lighting up on balconies, in courtyards and in private or semi-private rooms in nursing homes.

Smoking at playgrounds, however, will be banned.

Gray said the ban on smoking near the doors of bars would have made it impossible to smoke in certain areas of the city.

“If you’re in the French Quarter or in many parts of this town walking down the sidewalk, you’re always within 5 feet of a door,” he said.

Smoking also will be allowed in cigar bars and hookah bars that are already in existence, and vaping will remain legal at shops that sell e-cigarettes. However, cigarette smoking will be barred at those locations.

The enforcement of the measure also will be restricted. Williams successfully pushed an amendment that took that responsibility out of the hands of the Police Department, arguing it would interfere with officers’ more pressing duties and could provide a pretext to harass or search minorities.

“I think it would be poor judgment of this council to take a police officer off the street even for a minute to deal with smoking in bars and slow him down on the way to a rape complaint or a murder,” Williams said.

Head also noted several times during the meeting that the ban does not go into effect immediately and there will be time for additional changes.

The administration will review the amendments adopted Thursday before deciding how to proceed, Landrieu spokesman Brad Howard said.

“The smoking ban ordinance was amended nearly 100 times today,” Howard said, referring to individual changes contained in larger amendments. “We will carefully review the details of what was passed and look forward to working with the council in the coming weeks to ensure we have a solid, enforceable law on the books that helps reach our shared goal of creating healthy places throughout our city.”

The discussion was punctuated with moments of emotion. A former casino worker urged the council to pass the ban after describing how he had come down with lung cancer after working at Harrah’s for years despite not smoking himself. And Gray burst into tears as he listed the names of people he knew who died of lung cancer.

But the debate also contained the harder edge of economics, on both sides of the equation.

Harrah’s Vice President of Human Resources and Community Relations Logan Gaskill said a preliminary study conducted by the casino shows the ban would result in a loss of between $4 million and $14 million a year in revenue to the Canal Street casino.

But economic arguments also undergirded the arguments of those supporting the ban. Cantrell said 27 conventions have refused to return to New Orleans until smoking prohibitions are enacted; bringing in those events could add tourists and cash to the coffers of the city and its businesses, she said.

On the other hand, it will remain legal to light up in hotels, motels and convention centers that are rented out for private conventions of smoking-related industries. That’s an accommodation for the other side of the tourist equation: the desire to bring in conventions focused around tobacco-related products. And, in a nod to tradition, Carnival balls also can allow smoking.

Guidry, a former smoker, also said there could be economic benefits from more local sources.

“I believe we’ll see a lot of people coming from Jefferson Parish to Orleans to enjoy smoke-free gaming and smoke-free bars,” she said.

Many dismissed the argument that a ban would somehow harm the city’s culture.

“I don’t think smoking inside bars is at the heart of the culture of New Orleans,” Williams said. “I don’t think exposing our friends to secondhand smoke is at the heart of the culture of New Orleans.”