MONTPELIER — Eight East Coast states, the federal government and citizens groups from Indiana have reached an agreement with one of the country’s largest electricity producers to stop burning coal at two Midwest power plans.

American Electric Power agreed late Friday in federal court in Columbus, Ohio, to retire or switch to natural gas two coal-burning units at power plants in Ohio and Indiana by the end of 2015.

As part of the settlement, Vermont, Massachusetts, Rhode Island, Maryland, New Hampshire, Connecticut, New York, and New Jersey will receive a total of $6 million. The Indiana groups will receive $2.5 million.

Cheap natural gas and environmental regulations are causing utilities to shut down coal-fired power plants. AEP had previously planned to stop coal at one unit.