San Francisco became the first major US city to ban the sale of electronic cigarettes after supervisors gave the measure its second and final vote Tuesday.

Backers say they hope the legislation will curb underage use of e-cigarettes, but critics say the ban will make it harder for adults to purchase an alternative to regular cigarettes.

The move means that Juul Labs, the leading e-cigarette company, may no longer be allowed to keep its headquarters in San Francisco.

The company has been working on a ballot initiative that would regulate but not ban e-cigarette sales.

San Francisco is a city that celebrates its marijuana culture, but it appears deeply opposed to other vices, such as vaping (file image)

San Francisco is a city that celebrates its marijuana culture, but it appears deeply opposed to other vices.

Last year, voters approved a ban on the sale of flavored tobacco and in 2016, a tax on sugar-sweetened drinks.

E-cigarettes have been the most commonly used tobacco product among young people in the country since 2014.

According to the Centers for Disease Control and Prevention, the number of middle and high school students who use tobacco products increased by 36 percent from 2017 to 2018.

Health officials attribute this rise to e-cigarette use.

Dr Stanton Glantz, a professor of medicine at the University of California San Francisco Center for Tobacco Control and Research and a supporter of the measures, said e-cigarettes are associated with heart attacks, strokes and lung disease.

The presence of e-cigarettes has 'completely reversed the progress we've made in youth smoking in the last few years,' he said.

'Young people have almost indiscriminate access to a product that shouldn't even be on the market,' said San Francisco city attorney Dennis Herrera.

Because the FDA hasn't acted, he said, 'it's unfortunately falling to states and localities to step into the breach.'

In a statement to the Associated Press, FDA spokesman Michael Felberbaum said the agency will continue to 'tackle the troubling epidemic of e-cigarette use among kids.'

'This includes preventing youth access to, and appeal of, flavored tobacco products like e-cigarettes and cigars, taking action against manufacturers and retailers who illegally market or sell these products to minors, and educating youth about the dangers of e-cigarettes and other tobacco products,' he said.

Juul has framed vaping as a healthier alternative to smoking tobacco.

The company says it has taken steps to deter children from using its products such as making its online age verification process more robust and shutting down its Instagram and Facebook accounts.

'But the prohibition of vapor products for all adults in San Francisco will not effectively address underage use and will leave cigarettes on shelves as the only choice for adult smokers, even though they kill 40,000 Californians every year,' said Juul spokesman Ted Kwong.

The American Vaping Association also opposes San Francisco's proposal, saying adult smokers deserve access to less hazardous alternatives.

'Going after youth is a step that you can take before taking these out of the hands of adults,' said association president Gregory Conley.

Groups representing small businesses also oppose the measures, which they say could force stores to close.

'We need to enforce the rules that we have in place already,' said Carlos Solórzano, CEO of the Hispanic Chamber of Commerce of San Francisco.