After decades of decline, one resource in the Bay watershed is making a comeback — farmland.

Figures from the most recent agricultural census from the U.S. Department of Agriculture showed that the Bay watershed gained about 125,000 acres of agricultural land between 2007 and 2012, bringing the total to more than 12.6 million acres of crops, pastures and other farmland.

While that’s small — and within the census’ margin of error — it does signal that the region’s once precipitous rate of farmland loss halted in recent years as the housing market weakened and prices for many crops hit record highs.

“The economics of agriculture in the mid-Atlantic in recent years has been pretty good,” said James Shortle, an agricultural economist at Penn State University. “High prices have been the key thing, and low interest rates have also been good.”

Whether the figures in the most recent census represent a temporary pause in the long-term trend of agricultural land loss or signal a permanent change is anyone’s guess.

“If those markets remain strong, I can see where this type of leveling off is going to continue,” said Mark Dubin of the University of Maryland, who is the coordinator of the Bay Program’s Agriculture Workgroup. “But if they falter, I think there will be a pretty fast reversal, particularly if there is a greater value in some other land use, like development.”

Shortle agreed, adding that “farmland doesn’t compete well with the urban lands unless you have good commodity prices.”

“I think that is going to be a continuing tension in the watershed,” he said.

After years of record highs, prices for crops such as corn have dropped dramatically this year, and there have been some hints of recovery in the housing market.

From a Chesapeake Bay perspective, farmlands provide important habitats for many types of birds and animals. Plus the open land gets a chance to absorb rainfall, unlike developed landscapes where it is quickly shunted into local streams.

At the same time, a farmland increase could make the already daunting task of reducing Bay sediment and nutrient pollution even more difficult. Cropland and areas with large livestock populations generally produce the highest amounts of nutrient-laden runoff to the Bay and its tributaries.

The census shows that harvested cropland in the watershed — generally the most intensively managed fields — increased by about 150,000 acres, to about 5.9 million acres, with the watershed portion in all of the Bay states gaining acreage.

“Other things being equal, intensifying ag land is going to make the Bay problem worse,” Shortle said. “Where it happens specifically is important to assessing what the implications of that would be.”

For instance, he noted, changes near waterways, and the Bay itself, have a greater impact than changes farther upland. But the agricultural census doesn’t provide that level of detail, so weighing the exact impact is difficult.

States in the watershed bucked some of the national trends in the census, a voluminous compilation of survey data compiled every five years, but they tracked closely with the rest of the country on others.

Nationwide, the country experienced a loss of 7.6 million acres of farmland between 2007 and 2012. But the rate of loss is slowing.

“We were noticing a significant increase in the loss of land in farms over the previous censuses. This census, we’ve seen that slowing down nationwide,” said King J. Whetstone II, director of the Northeastern Region of the USDA National Agricultural Statistics Service.

Virginia ranked fifth in the country among states that saw increased farm acreage over the five-year period, adding nearly 200,000 acres. Most of that acreage was in its southwestern portion, but counties located in the Bay watershed accounted for about 33,500 acres of the gain.

The Bay portions of Maryland and New York were the only state portions that shed farmland between censuses, while Bay watershed portions of Pennsylvania, West Virginia and Delaware added acreage.

The census is used by the state-federal Bay Program to help project county-by-county land use changes across the Chesapeake watershed. Those changes can guide how nutrient applications — and their sources — change over time for a county or watershed.

Historically, those projections have shown a steady loss of farmland throughout the region, and those decreases likely contributed to reduced nutrient runoff over the years, particularly during the 1980s and 1990s when the region suffered substantial farmland losses.

But the new census will likely change future projections, at least for some areas, said Matt Johnston, a nonpoint source data analyst with the University of Maryland stationed at the Bay Program.

Not only do agricultural acres change, but the data also show some shifts in animal populations, including an unexpected increase in cattle, where numbers were previously thought to be decreasing, Johnston said.

Most shifts are subtle and are not likely to result in dramatic changes across the watershed, he said, though some locations could see more substantial impacts after all of the data are analyzed.

“There are winners and losers in all of this,” Johnston said. “It could be really big in some counties, and really small in other counties.”

Overall, the country saw the number of small and beginning farm operators increase by more than 11 percent since 2007. But some of its biggest farms grew even larger as operations consolidated or plowed more land into crops, especially in the Midwest.

Chesapeake Bay states embodied both ends of this spectrum, with counties closer to the metro sometimes adding small farms, while farms in more rural areas sometimes added acreage.

The number of small farms with fewer than 50 acres grew exponentially in the New England states, a trend that is starting to spread to mid-Atlantic states like Virginia.

“There is something going on in terms of the small operations around the metro areas,” said Jim Pease, an agricultural economist at Virginia Tech. “You are getting an increase in farms of fairly small operations, but primarily producing direct consumer products, be that livestock or vegetables.”

Nationally, farms reported an 8 percent increase in their direct-to-consumer sales, like those that occur at farmers markets, between 2007 and 2012.

“When you compare it to the Midwest, you’ve got your corn and soybean and cattle,” Whetstone said. “The diversity of agriculture in the Northeast is maybe superior to any other region, with the exception of probably the West Coast because of California.”

Of the 19 states that gained agricultural lands in the 2012 census, several of them were in the Northeast and mid-Atlantic regions that also saw an increase at least in part because of the increase in small farms.

Meanwhile, changes in the traditional Farm Belt states continued to drive the biggest trends nationwide. This was the first time the census showed that the combined acreage of corn and soybean topped 50 percent of all harvested acres in the country. Beef cattle made up the largest category of farm operations, with 29 percent of all farms and ranches in the country specializing in cattle in 2012.

While the Chesapeake Bay region is known for its high enrollments of farmers in land conservation programs like the Conservation Reserve Enhancement Program, other swaths of the country showed much higher enrollment in terms of acreage in the 2012 Census.

A census map showing a blue dot for every 5,000 acres enrolled in Conservation Reserve, Wetlands Reserve, Farmable Wetlands or CREP included densely dotted areas in Washington state, Montana, North Dakota and near the shared borders of Colorado, Kansas, Oklahoma and Texas. Southern Iowa and northern Missouri also reflected high enrollments, while the Chesapeake Bay region, where some of these programs originated, showed comparatively little.

“It could be because of the size of those farms,” said Jim Baird, mid-Atlantic director for the American Farmland Trust. “You have to (enroll) a lot of farms to get one of those dots in the mid-Atlantic.”

Baird mentioned that many of the regions with high enrollments are home to sprawling ranch or prairie lands in which one farmer holds hundreds of thousands of acres.

“If you selected another measurement, like percentage of streams with buffers or percentage of farmers with CREP, it might even out more,” Baird said.

But the census data shows a decreasing trend in the amount of farmland in land retirement programs such as CREP and its Conservation Reserve Program. Bay watershed farmland enrolled in those programs declined 20 percent from 2007 levels, to about 257,000 acres.

The change could be, in part, a reflection of the first round of expiring 15-year contracts from when CREP was first launched.

These numbers hint at a change that could be a problem for some states. Retiring active cropland is an important source of nutrient reductions in both Pennsylvania’s and Virginia’s watershed implementation plans, which show how jurisdictions intend to meet Bay nutrient and sediment reduction obligations.

A separate analysis for the USDA by Shortle and several colleagues also showed that both Pennsylvania and Virginia needed to retire farmland to meet their Bay nutrient and reduction goals, with Virginia facing the greatest need.

“Virginia by a long ways has a hard time making the WIP goals unless you retire farmland,” Shortle said. “Pennsylvania could meet its nitrogen allocation, but not the phosphorus allocation, though it is just by a little bit.”

Dubin, with the Bay Program’s Agriculture Workgroup, said that no one should count on the retirement of farmland in the future as a way to achieve nutrient reduction goals.

Even if commodity prices remain low, the spikes of recent years mean landowners will likely want to keep land available to bring back into production if prices get high rather than enroll in a land retirement program.

“I don’t see [farmland retirement] increasing, I see that decreasing,” Dubin said. As a result, he said, his agricultural workgroup is trying to identify new management techniques, such as more precisely managing fertilizer applications on field, to help meet nutrient goals.