DEERFIELD — U.S. Rep. Seth Moulton stopped by Bar-Way Farm on Thursday morning to learn about the dairy farm’s role in the local economy and how the federal government can step in to support farms in western Massachusetts.

Moulton is running against incumbent U.S. Sen. Ed Markey for his seat in Congress.

After meeting Peter Melnik, who runs Bar-Way Farm alongside his brother as the fourth generation, and Darryl Williams, who owns Luther Belden Farm in Hatfield with his wife, Moulton met Bar-Way’s hundreds of cows.

“We treat them like world-class athletes, and we have to — they’re performing,” Melnik said with a grin as he described the cows’ diet, rich with nutrition from corn. “The more we take care of our animals, the more productive they are. That’s our top priority.”

Melnik walked Moulton through what Williams called the “closed loop” at Bar-Way Farm, where one cog in the operation turns the other, from the cow manure that becomes fertilizer for the corn to the anaerobic digester that converts manure and other ingredients into electricity that powers the farm.

After the cows had greeted Moulton, Melnik brought him to the anaerobic digester, which processes manure and about 100 tons of food waste per day from at least 50 companies, like the Coca-Cola distributor in Northampton, Whole Foods Market in Hadley, Tree House Brewing Co. in South Deerfield and New England Natural Bakers in Greenfield. Inside the 105-degree digester, microbes and bugs break the waste down and produce methane.

The digester then captures the methane before an engine burns it, turning a generator that produces enough electricity to power between 800 and 1,000 homes in Deerfield’s power grid. In Hatfield, Williams’ farm operates a similar, smaller digester.

 “We’ve become such a part of the local economy,” Melnik told Moulton.

As dairy farmers face restrictions on milk pricing and a dwindling number of farmers, Melnik and Williams said many dairy farms in western Massachusetts diversify their day-to-day operations and rely on the multiple facets of their farms to survive.

“It sounds like this new thing, but Darryl and I can both remember what our grandparents did and our great-grandparents did, and it’s nothing new. It’s just … using some modern technology with some old practices to make it work,” Melnik explained. “It’s working with nature.”

“Agriculture is such an important part of Massachusetts, not just historically but today, and this is a great example of a farm that’s completing the cycle between milk, manure, methane, electricity production, waste, compost, fertilizer, feed. It all happens right here in this ecosystem, so we’re not dependent on the Middle East for fertilizer where prices are skyrocketing because of Trump’s war,” Moulton said after the tour. “A farm that’s 100 years old, 107 years old, people think that this is going back in time. Actually, this is a super innovative business, and people want innovation.”

To carry farming into the future, Melnik, Williams and Moulton discussed the benefit of adopting similar legislation to the Young Fishermen’s Development Act. The act, which Moulton led, proposes training, education, outreach and technical assistance for young people with their sights set on the fishing industry.

Instead of new fishers, Melnik and Williams called for federal action that would expand training for the next generation of farmers.

“We need a way to transition some of these farms so that they’re maintained,” Williams said.

The farmers told Moulton that the state has invested in the sustainability of their farms. At Bar-Way Farm, grants from the Massachusetts Clean Energy Center and the U.S. Department of Agriculture’s Natural Resources Conservation Service funded the installation of the digester. At Luther Belden Farm, grants from the Massachusetts Department of Agricultural Resources funded a no-till drill for its corn fields, a new barn and machinery that milks the cows.

“It just shows you the power of what the government can do,” Melnik said as Moulton looked up at the digester.

Williams said relaying farmers’ needs through efforts like Thursday’s tour helps them secure the support from the government they deserve.

“We have to advocate for ourselves, because there are so many people that are so many generations away from agriculture,” Williams said. “Even though we’re a very small minority … it’s very important that we have a voice there, because believe it or not, we still feed all the same people that were fed 40 years ago or 100 years ago. It’s very important that we stay connected to the people, to the decision-makers, and try to educate them the best we can.”

Reflecting on Moulton’s visit, Williams added, “I’m hoping he’ll embrace what he’s seen. It helps represent what we do here in Massachusetts.”

Aalianna Marietta is the South County reporter. She is a graduate of UMass Amherst and was a journalism intern at the Recorder while in school. She can be reached at amarietta@recorder.com or 413-930-4081.