New York (CNN Business) Chipotle agreed to pay a $1.3 million fine for more than 13,000 child labor violations at several of its Massachusetts locations.

The state's attorney general's office criticized the company in a statement for "routinely" violating child labor laws between 2015 and 2019 at more than 50 Chipotle locations. Teenagers under 18 years old were forced to work without proper work permits, late into the night and for too many hours per day and week, according to the state.

"Chipotle is a major national restaurant chain that employs thousands of young people across the country and it has a duty to ensure minors are safe working in its restaurants," Attorney General Maura Healey said in the statement. "We hope these citations send a message to other fast food chains and restaurants that they cannot violate our child labor laws and put young people at risk."

Chipotle CMG has 62 restaurants in Massachusetts. The state said this is the largest child labor penalty in its history.

The three-year investigation followed a 2016 complaint from a parent telling the office that their kid worked "well past midnight" at one Chipotle location. The office's findings revealed that the company permitted dozens of 16 and 17-year-old employees to work later than the law allows. Chipotle also allowed children to work more than the state's nine-hour daily limit and the 48-hour weekly limit.

Read More