SAN FRANCISCO — San Francisco became the first city in the United States to ban e-cigarettes on Tuesday, a move that seeks to curb what experts have described as a nicotine epidemic among teenagers.

“We’ve worked for decades to decrease tobacco usage and try to end nicotine addiction,” said Shamann Walton, a member of the board of supervisors and a co-author of the bill banning e-cigarettes, which will go into effect 30 days after it is signed by the mayor. “Now you have this device loaded with nicotine and chemicals that’s drawing people to addiction. We need to keep it out of the hands of young people.”

Passage of the bill was praised by anti-tobacco advocates and the American Heart Association, among other health organizations.

But the bill also has many critics, including researchers who say they worry that a blanket ban on e-cigarettes could harm the wider goals of anti-tobacco efforts by eliminating what experts consider a safer alternative to conventional cigarettes.