Town and state officials gathered at Police Department headquarters Wednesday morning for a ribbon-cutting to mark the installation of a “microgrid,” the first of its kind in a state municipality.

The microgrid, installed with the help of a $1.1 million state grant, is a system designed to provide power to the neighboring buidlings that house both police and fire headquarters and Operation Hope in the event of an outage. It also is supposed to manage the buildings’ daily power usage, making sure cheaper sources, such as solar panels, are used first, according to Assistant Public Works Director Ed Boman. The system will also help to power the cell tower on top of the police station.

“I’m thrilled Fairfield is leader in this,” First Selectman Michael Tetreau said. He said the microgrid, and the state grant that enabled it, are examples of government thinking ahead and being proactive.

Tetreau also praised Boman, who has been responsible for the expanding the town’s renewable energy sources, including solar panels at many buildings and town vehicles powered by natural gas, often at no cost to the town.

“Ed does all the heavy lifting for all of this,” Tetreau said, adding that agencies know if they give the town grant money for renewable energy projects, “We’re going to make good use of it.”

“This is really an invaluable piece of the puzzle,” said Katie Dyke, deputy commissioner of the the state Department of Energy and Environmental Protection. She also announced a third round of microgrid grants, totaling $30 million statewide.