BELFAST, Maine — Maine may be the oldest state, but it certainly attracts an outsized crop of young farmers, according to preliminary statistics released last week from the United States Department of Agriculture’s 2012 census.

The number of farmers aged 34 and younger grew by nearly 40 percent in the five years from 2007 to 2012, the last time the USDA did a comprehensive agriculture census. That growth surge — from 396 to 551 young farmers — far surpassed the 1.5 percent increase in the numbers of young farmers in the United States as a whole.

Maine’s growth spurt of young farmers isn’t a surprise to 31-year-old Mike Bahner, who has owned Bahner Farm in Belmont since 2009 along with his wife, Christa. Both are originally from out of state, but Mike Bahner said that they chose to plant their roots here because Maine has a lot going for it for young farmers. Those draws include relatively affordable farmland, beautiful country, a good market for their produce and the new farmer programs offered by the Maine Organic Farmers and Gardeners Association, he said. In addition to vegetables and blueberries, the couple, who are full-time farmers, are raising two young children on their farm.

The USDA survey shows other statistics that also indicate that farming in Maine is on the upswing — good news, according to John Piotti, president of the Belfast-based nonprofit Maine Farmland Trust. The data show that the value of agricultural products in the state has increased 24 percent in five years, that a growing number of landowners now list farming as their primary occupation and that the amount of land in farms has increased by 8 percent in the same time period.

That’s a sharp turnaround from the recent past. In 2000, there were about 7,000 farmers in Maine and farm acres in production were declining significantly, he told the BDN five years ago. Conventional wisdom in Maine was that agriculture here was dying, he said Friday. In 2012, the survey counted 8,176 farms and 1.45 million acres of land in farms. Ten years prior, it counted 1.36 million acres of land in farms.

Nationally, the amount of land in farms declined from 922 million acres to 915 million acres, the third smallest decline in between censuses since 1950. The numbers of farms in the country also decreased to 2.1 million in 2012, down 4.3 percent from the 2007 agricultural census. But in every New England state, both the number of farms and the amount of land in farms went up.

The growing numbers of young farmers settling down in Maine also is very significant, Piotti said, and is a trend that counters common beliefs of the recent past.

“What I heard from people 10 years ago, 15 years ago, was that young farmers don’t have good tenacity. They’ll never stick with it,” Piotti said. “The truth is that the young farmers I know are smart, incredibly committed and very capable. They understand what they need to do to succeed. They understand the marketing side. They understand the production side.”

That’s true, according to Mike Bahner, who said there’s much more to the business than growing beautiful crops.

“Absolutely, you can make a living farming here,” he said. “You have to be business savvy. You have to be market savvy. And you’ve got to be able to produce.”

The full agricultural census will be released by the USDA in May. More preliminary information from the report can be found at the website www.agcensus.usda.gov.