An agreement negotiated by a team led by California and New York attorneys general means e-cigarette maker Juul Labs will have to pay $462 million to six states and the District of Columbia during an eight-year span.

The settlement, announced Wednesday and which includes Colorado, Illinois, Massachusetts and New Mexico, is for Juul and its former directors and executives’ alleged role in contributing to the youth vaping epidemic that led to a rise in underage e-cigarette smoking across the United States.