Hundreds of people Saturday took advantage of mild temperatures and partly sunny skies to fortify the dunes that help keep sand on Long Island’s beaches and protect shoreline properties from flooding.

“We wanted to help so the beach doesn’t go away,” Robert Hewitt, 7, said as he dug into the sand to the sound of crashing waves.

The Seaford boy’s father, also named Robert Hewitt, gave his two sons a lesson in the importance of saving the dunes as they drove to Tobay Beach Saturday morning. The Town of Oyster Bay has been sponsoring a dune grass-planting event at the beach since 1989.

Upon arriving, the Hewitts and other volunteers were handed bundles of dune grass and shovels.

They first walked through a tunnel under Ocean Parkway that formerly was made impassable by superstorm Sandy, which dumped several feet of sand into the underpass.

“Everything was moved around and ripped up out of the ground,” recalled volunteer Kerri Kubat, 42, of Massapequa.

advertisement | advertise on newsday

The damage to the dunes from Sandy would have been worse without the grass that had been planted over many years, Town Supervisor Joseph Saladino said.

“The dune grass is like the rebar of the dunes,” keeping the sand in place, he said.

If it weren’t for the dunes catching windswept sand, the town would have to truck in sand from elsewhere every year to combat erosion, Saladino said.

Erin Tumminello, 13, of Massapequa said one reason she was at the beach was to help piping plovers, small birds with a beach habitat that the federal government says are a “threatened species” on the East Coast, meaning they are at risk of becoming endangered, as they are in the Great Lakes region.

“They’re extremely endangered because the dunes are being destroyed, and by planting grass we’re helping save their homes,” Erin said.

Erin was one of seven girls from Girl Scout Troop 2407 in Massapequa planting grass on Saturday.

New York Islanders legend Bob Nystrom, a Huntington resident who lived for years in Oyster Bay, said as he was signing autographs at the beach that the dune-stabilization event helps ensure beaches are healthy for generations to come.

“To see the beauty of the water and beaches — we’ve got to preserve that for our kids and their kids,” Nystrom said.