BOSTON (AP) — A Massachusetts electricity supplier has agreed to pay $5 million to settle allegations of using deceptive marketing and sales tactics to lure residents into costly contracts with high electricity rates.

Democratic Attorney General Maura Healey said Wednesday that the tactics used by Viridian Energy included door-to-door sales, direct mail, and family-and-friend-based "network marketing."

Healey also alleged that consumers who switched to Viridian ultimately paid more for electricity than if they had stayed with their utility.

Under the settlement, Viridian agreed to pay a total of $5 million, the bulk of it going to affected customers. Some money will also go to help pay for future enforcement cases against competitive electricity providers.

The company has also agreed not to market its electricity supply door-to-door in Massachusetts for the next two years.