As the sun sparkled on the blue water of Drakes Estero on the Point Reyes peninsula Wednesday, an excavator perched on a barge pivoted, lassoing a pole and yanking it out of the estero floor.

In a $4 million project, contract workers employed by the National Park Service are hard at work extracting about 5 miles of oyster racks, along with other debris, at the former site of the Drakes Bay Oyster Co.

The Park Service evicted the company in late 2014 by order of the federal government after Drakes Bay owner Kevin Lunny fought the eviction to the U.S. Supreme Court. Many in the West Marin community had rallied around the decades-old Marin institution, which employed 30 people.

Now, “we’re working to restore the ecological function of the marine wilderness,” said John Dell’Osso, chief of interpretation at the Point Reyes National Seashore.

The shallow bay is home to flora and fauna including harbor seals, fish and eelgrass beds.

“Fortunately, it is a healthy ecosystem. Once the posts and debris are removed, we expect the eelgrass to grow back on its own,” said Park Service marine ecologist Ben Becker.

On Wednesday, the long beach at the estero was lined with piles of brown, dead eelgrass. Becker said eelgrass sloughs off at this time of year much the same way dead leaves fall off trees in the fall.

The oyster racks, which look like low piers, are horizontal planks held up by 10- to 15-foot poles. The excavator, resembling a Tyrannosaurus Rex, opening its jaws as widely as possible, drops a chain with a loop over the top of each pole, then pulls it out of the estero floor and stacks it on the barge.

The timing is tricky, Dell’Osso said.

“Because the poles are only about 15 feet tall, they have to work at low tide so they can locate them,” Dell’Osso said. “But there has to be enough water so the barge can get out there.”

Removing the poles is also a good idea, Becker said, because “most of these posts are full of non-native animals and plants.”

The National Park Service came up with $2 million for the work, he said, and the National Park Foundation, a nonprofit group, matched the funds.

The hypnotic, slow motion of the excavator was upstaged somewhat by a frolicsome river otter who regaled members of the press at the estero with various poses atop a rock.

Dell’Osso said he wasn’t sure how soon the job would be done.

“Our contract runs through February 2017,” Dell’Osso said. “It all depends on how efficient they are at removing the posts and debris,” such as the oyster bags buried beneath the racks that the company had used to grow oysters.

Emotions still run highover the loss of the popular oyster farm, which produced as many as 100,000 oysters a day.

It is likely this project will reduce the water clarity and the growth of eelgrass, said Phyllis Faber of Mill Valley, a wetlands biologist who has lived in Marin since the 1960s. In the 1970s, Faber negotiated and oversaw the breaching of the dikes and restoration of Corte Madera’s waterfront, which had been diked and drained by a developer.

That waterfront now has returned to nature, one of the first such projects in the Bay Area.

In response to Faber’s concern, “We don’t believe the oysters were improving the water quality because there is so much tidal action,” said Becker. He said that a study by San Francisco State University’s Romberg Tiburon Center for Environmental Studies showed the bulk of the water in the estero was oceanic plankton.

Faber answered, “Oysters’ source of food is the plankton in the water. Those oysters grew very well and were healthy, so you know they were consuming the plankton in the water. That made the water more clear.”

Another concern of Faber’s: excavation and dredging of the water bottom will damage the estero floor.

“We’re not dredging,” Becker said. He said 2 inches of the river bottom will be put through a sieve. “Dredging is scooping up.”

Faber said, “It is common sense that if you’re using a sieve to go through matter on the estero floor, clearly that will disturb the estero floor.”