E-cigarettes have been touted by their makers and some public health experts as devices to help adult smokers kick the habit. But school officials, struggling to control an explosion of vaping among high school and middle school students across the country, fear that the devices are creating a new generation of nicotine addicts.

In his four years at Cape Elizabeth, Mr. Carpenter says he can’t recall seeing a single student smoke a cigarette. But vaping is suddenly everywhere.

“It’s our demon,” he said. “It’s the one risky thing that you can do in your life — with little consequence, in their mind — to show that you’re a little bit of a rebel.”