SEABROOK, N.H. —With fireworks complaints exploding in Massachusetts, the state's attorney general is ordering a national fireworks seller with locations in New Hampshire to stop mailing advertisements to residents.

Phantom Fireworks - which has locations in Londonderry, Seabrook and Hinsdale - has recently mailed advertisements to Massachusetts residents, including to employees of WCVB. Attorney General Maura Healey announced Wednesday a cease and desist order telling the company to immediately stop those advertisements.

"Phantom Fireworks knows its products are illegal in Massachusetts, yet we are hearing that residents are getting their advertisements in the mail," Healey wrote in a statement. "We sent a cease and desist to stop this intentional marketing scheme and prevent more of these unsafe products from being brought into our neighborhoods."

Under state law it is illegal to use, possess or sell fireworks in Massachusetts. It is also illegal to buy them elsewhere and bring them into the state.

Healey said the Phantom Fireworks mailings are in violation of Massachusetts consumer protection law because they advertise a product that "the state has deemed to be unsafe and illegal."

Fireworks are sold legally in New Hampshire.

Boston Mayor Marty Walsh said complaints to police about illegal fireworks are up more than 5,540% compared to last June. Since the start of the year, 8,533 related complaints have been logged in the city, officials said.

Walsh created a new task force last week to address the issue of illegal fireworks in Boston.