The past and the future of electricity in America are perhaps most visible in a Minnesota town surrounded by potato farms and cornfields.

Towering over Becker, a community of a little more than 5,000 people northwest of Minneapolis, is one of the nation’s largest coal power plants. It is being replaced — to the dismay of some residents — with thousands of acres of solar panels and a test of long-duration batteries.

Becker is one of the first of a group of seven Minnesota municipal areas, called the Coalition of Utility Cities, making the change from a fossil-fuel-based economy to clean energy.

“We are the guinea pig for the whole group,” said Tracy Bertram, the mayor of Becker, acknowledging the anxiety some have felt about the loss of an economic anchor. “People don’t like change. It’s the unknown: ‘What will my world look like?’”

When the Sherburne County Generating Station, known as Sherco, completes its renewable project on adjacent land, it will stand as the largest solar farm in the Upper Midwest — replacing three coal units in Becker with three solar sites on the town’s outskirts along the Mississippi River.