Michael Schwirtz / New York Times News Service

LONG BEACH, N.Y. — It is February, but the smell of Christmas wafts up from the shores of Long Beach these days.

Thousands of Christmas trees, stripped of lights and ornaments, have been arranged along the beach here as part of an unusual plan to restore the protective dunes washed away by Hurricane Sandy. The trees are supposed to catch sand blown by the wind, until gradually the dunes grow up around them.

Long Beach, one of the localities in the New York region most devastated by the storm, is a thin ribbon of land between Long Island and the Atlantic Ocean. The storm washed away about half a million cubic yards of sand, officials said, leaving residents dangerously exposed to even modestly inclement weather.

“Some areas lost three to five feet in elevation on the beach,” said Jim LaCarrubba, the director of public works here. “We’ve become that much more vulnerable to storms.”

From a distance, the trees resemble a somewhat bizarre gathering on the beach, like a large pod of exceptionally fuzzy seals. There are about 3,000 in all. The local Home Depot donated some. Others stood in the living rooms of residents until recently, adorned with decorations.

Other localities in New York and New Jersey are also using Christmas trees to buttress beaches damaged by Hurricane Sandy.

Healthy sand dunes are the first line of defense for coastal towns during storms because they keep the ocean from invading backyards and basements. But sand alone is not enough. An anchor, often naturally growing grasses, is needed to prevent the sand from blowing or washing away.

But the grasses cannot grow without a significant accumulation of sand, and in Long Beach these days there simply is not enough. That is where the Christmas trees come in.

“The trees act in place of natural plant growth,” said Charlie Peek, a spokesman for the parks service in North Carolina, which has been using Christmas trees to spur dune revival for years. “It gives it a little head start, a little bit of a helping hand. In an ideal situation, the plant growth comes in after it and starts building a natural dune.”