PLYMOUTH, Mass. – The alewife, a type of river herring, wriggled against the current, a 10-inch streak that disappeared from view as it rounded a bend in the stream.

It was a normal springtime pilgrimage for the fish, which lives in the ocean but swims upstream to spawn. But this time it was happening in a surprising place — a waterway that was not here two years ago.

For more than a century, this place, called Tidmarsh Farms, was the site of a cranberry bog, a thick carpet of the fruit's vines atop a bed of sand with straight water channels. But commercial cranberry farming, which began in Massachusetts, has flagged here in recent years as prices dropped and different farming methods emerged elsewhere. Unfolding here now is an ambitious project: turning a cranberry bog back into the coastal wetland it once was.

Economic shifts have left landowners and communities around the country trying to figure out what to do with fallow industrial space, from abandoned farmland to empty factories and warehouses. Experts say the project here shows one path for dormant cranberry bogs.

But they say this could also be a broader template for bringing back disappearing habitat that scientists say could be useful in an age of climate change.

"Lands like this can store floodwater or storm surges," said Alex Hackman, a restoration specialist with the state who has overseen much of the work at Tidmarsh. "The ocean is going to push inland, and it's lands like this — if we can protect them and re-naturalize them — that make for good places to receive that water in the future."

After more than a year of intensive work, including seven earthen dam removals and a project to rebuild the stream that had not flowed uninterrupted since the 1800s, new life is returning to Tidmarsh. A walk through the property is a stroll back in time. Tadpoles and kestrels are turning up. Cranberries are withering. And the changes offer clues to a crucial question: What does it take for nature to come back?

In 1989, this was a thriving cranberry bog that produced 1 percent of Ocean Spray's harvest. But technological changes enabled more efficient farming to take place elsewhere, including on dry land, and southeastern Massachusetts is now dotted with struggling cranberry bogs.

The owners of this land — Glorianna Davenport, a visiting scientist at MIT Media Lab, and her husband, Evan Schulman, a financial services entrepreneur — decided to end the farming operation in 2010. They had already begun the process of getting protections for the land and finding state resources and federal money to pay for restoration.

Yet they had no idea, Davenport said, "what it would take to restore this to a natural, functioning wetland."

In Europe, there have been efforts to bring back much older landscapes, called "rewilding." And in the United States, the 1988 farm bill created incentives for preserving and restoring wetlands on former farmland.

But climate change has raised new questions about what precisely the land should be restored to. Research here could help answer them.

"With changing average temperatures and precipitation, species moving in that weren't there historically, folks are often wrestling with and pretty divided about, 'How do we figure out what to do?' " Christie said.

Restoring nature, it turns out, is not as simple as letting wild vegetation take over. A team had to hunt for signs in the peat deposits far below ground for clues about where water used to move through the site. For a year, heavy equipment was used to reconstruct the stream, remove dams, break up the bog mat and create divots and mounds in the ground, called micro-topography, where water pools and birds alight.

"We like to remove the limiting factors and let nature heal herself over time," Hackman said

There is a push and pull between old and new on Tidmarsh, between nascent plants and those that are dying. The land is dotted with newly planted Atlantic white cedars, a native species that has become increasingly rare in this part of the state because so much of it was logged.

Meanwhile, pitch pines — small trees common in drier environments like Cape Cod that sprang up here when the bog was full of sand — are struggling. The scientists said that's a sign the restoration is working.

But the most prominent feature here is the stream itself, which flows from a pond and curls gently through the land.

Because of the dam removals, there is now an open channel between the stream here and the ocean — and a path for herring to get from the ocean to here, and back.