Juul has agreed to pay North Carolina $40 million to settle the first of a spate of lawsuits brought by states that claimed the company’s marketing practices fueled widespread addiction among young people to its high-nicotine electronic cigarettes.

The settlement was announced Monday by Josh Stein, North Carolina’s attorney general, who sued the company in May 2019. In the agreement, the company denies any wrongdoing or liability.

The consent decree requires Juul to sell its products only behind the counter in North Carolina stores and to use third-party age-verification systems for online sales. The order also commits Juul to sending teenage “mystery shoppers” to 1,000 stores each year to check whether they are selling to minors.

It also bars the company from using models under age 35 in advertisements and states that no advertisements should be posted near schools.

“For years Juul targeted young people, including teens, with highly addictive e-cigarettes,” said Stein in a statement. “It lit the spark and fanned the flames of a vaping epidemic among our children — one that you can see in any high school in North Carolina.”

In a statement, Joshua Raffel, a Juul spokesman, said: “This settlement is consistent with our ongoing effort to reset our company and its relationship with our stakeholders, as we continue to combat underage usage and advance the opportunity for harm reduction for adult smokers.”

Thirteen states, including California, Massachusetts and New York, as well as the District of Columbia, have filed similar lawsuits. The central claim in each case is that Juul knew, or should have known, that it was hooking teenagers on pods that contained high levels of nicotine. Some of the youths in the cases claimed serious harm, including possible lung damage and mood disorders.

E-cigarettes and other vaping products were initially conceived to be a reduced-harm alternative to combustible cigarettes, which are linked to the deaths of about 480,000 people in the United States each year. But Juul, which featured young, hip-looking people in its first advertisements, billboards and social media, quickly caught on with teenagers and young adults who had never smoked. Although nicotine is not deadly, some research shows it can impair the developing brain.