SANFORD — The three tents set up at Our Farm on Hanson Ridge Road came in handy when the clouds burst Sunday afternoon during Maine Open Farm Day.

Within seconds after the thunder started, a crowd that included seven Montreal nuns converged under cover while farm owner Aron Gonsalves rushed to move cages of turkeys and chicks out of the way and bring in hay bales to sit on. Farming is all about improvisation, his wife, Laura Young, said.

“It was a great turnout,” Young said.

Our Farm was one of the stops on a 4-mile, 11-farm trail in the Springvale section of Sanford organized by Sanford Trails with help from Three Rivers Land Trust and Forest Works! to coincide with the 25th annual statewide event.

Some of the state’s richest soil lies along Hanson Ridge, where a cluster of farms has sprung up over the decades. Local landowners opened their land for a day to allow visitors to walk between the farms.

Lee Burnett, project director of Forest Works! – a Springvale organization – hatched the trail idea. He said the event involved diverse groups that do not normally work together.

“This is a way we can all help each other,” he said.

Hanson Ridge is farmed by old- and new-timers. McDougal Orchards has been in the same family for 235 years.

Gonsalves and Young, Connecticut transplants via Hawaii, bought their farm a year ago.

Michele and Philip Desautels bought 37 acres of farmland and orchards on the ridge last year and dubbed it Ferment Farm. During the week they live in Waltham, Massachusetts, where she works at the U.S. Coast Guard and he works in high tech. On weekends they are back in Sanford gearing up to sell the hard cider they produce from the orchard.

“The goal is fermented food education,” Michele Desautels said.

Robert Sharood started his Mousam Valley Mushrooms in 2011 while still a student at Saint Joseph’s College in Standish. He harvested his first crop in 2013.

A year later his pink, pearl and Italian oyster mushrooms, grown in wood chips from nearby woods, are now sold at Hannaford and Whole Foods supermarkets.

“We are ramping up to 600 pounds a week,” Sharood said.

On Sunday, he served visitors medicinal tea, brewed from the chaga mushrooms he collects from the birches in nearby woods.

“It’s pretty good,” said Alyssa Roy, who lives down the road and was visiting the farm for the first time.

Maine Open Farm Day comes just as many vegetable growers are shifting into high gear, harvesting corn, tomatoes and other summer crops. About 90 farms across the state took part this year.

After decades of decline, Maine farms have rebounded in the past decade. Since 2007, the value of agricultural products produced by Maine farms has increased 24 percent to more than $763 million annually.

In Sanford, the self-guided trail drew flocks of walkers who caught glimpses of private land that is normally off-limits. Then the rain came and a tractor-pulled wagon drove them back to their cars.

But Marisa Tobias of Pittsburgh said the rain didn’t stop her from having fun.

“This is what I chose to do on my birthday,” Tobias said.