On a sweltering afternoon on Staten Island, the New York City parks department unveiled its latest weapon in the war on phragmites, an invasive weed that chokes the shoreline: goats. Twenty Anglo-Nubians, to be exact. With names like Mozart, Haydn and Van Goat, and with floppy ears and plaintive bleats, they did not seem fearsome. But on Thursday they were already munching inexorably through the long pale leaves in the first phase of a wetland restoration at what will soon be Freshkills Park.

Known for their unending, indiscriminate appetites, the goats are being rented by the city for the next six weeks from a farmer in the Hudson Valley. Parks officials are counting on the goats to clear the phragmites across two acres of wetlands that will eventually be cultivated with native grasses like spartina and black needle rush. The hope is that the goats will weaken the phragmites, setting the stage for another series of assaults on their stubborn rhizomes — applying herbicide, scarifying the earth and laying down sand.

In the short term, the goats are part of an unusual experiment to eradicate the pesky reeds, which were introduced from Europe in the late 19th century and which, once rooted, are almost impossible to eliminate. They have fueled brush fires across the region and pushed out other species along the East Coast.

But the farm animals are also being tested for their lawn-mowing prowess, especially at Freshkills Park, which is in transition from its former life as the world’s largest landfill to its future one — as the largest park to be developed in New York City in more than a century.