SANDWICH, Mass. — Parts of the Massachusetts coastline could face a lengthy recovery process after being pummeled by severe winter storms, the state’s top environmental official said Friday.

Secretary of Energy and Environmental Affairs Matthew Beaton was joined by local state legislators as he toured beaches in Sandwich and Barnstable on Cape Cod.

The visit came as state officials tallied up damage assessments and snow removal costs in anticipation of filing a disaster assistance request with the federal government. Some areas of Massachusetts have received more than 8 feet of snow in the past 30 days.

Dunes at Town Neck Beach in Sandwich were washed out by the first major snowstorm in late January, Beaton said in a telephone interview after Friday’s tour. Sand was pushed into a tidal marsh and blocked the mouth of nearby Mill Creek, cutting off a vital part of the area’s ecosystem, he said.

Several homes in the town were damaged.

Sandy Neck Beach in Barnstable has also suffered significant erosion, Beaton said, threatening the main parking lot of the beach, which is a popular summer attraction.

The storms also wreaked havoc elsewhere along the coast, including damage to seawalls in Marshfield and Scituate.

“Each coastal community is facing their own challenges,” Beaton said. “Overall it’s a story of the coastline being pounded.”

It isn’t clear when Massachusetts formally planned to submit its disaster assistance request to the Federal Emergency Management Agency seeking relief for already over-budget towns.