In the 1960s and early ’70s, farmers markets in Maine and across the U.S. seemed hopelessly outdated: Industrial farming and supermarkets, largely in the post-war years had rendered them obsolete. It was just the latest of transportation and technological developments, as well as population shifts, that have affected the growth, decline and rebirth of markets in Maine for some three centuries.

Business at Maine’s farmers markets wasn’t exactly booming in 1979 when an independent truckers strike left supermarket shelves nearly empty, driving home to consumers the fact that New England’s food supply largely came from “away.” At the time, Maine farms were producing “a surprisingly limited variety and quantity of food as they had come to specialize in ever fewer commodities, such as milk and eggs,” according to the Maine Policy Review’s 2011 report on Maine’s food system. Most of the produce grown in the state was trucked down to the wholesale markets in Chelsea, Massachusetts, where brokers bought it, shipped it back to Maine, and sold it at higher prices, a journey that seems crazy on the surface of it and that benefited the middleman more than the farmer. For consumers, the process of getting their hands on some Maine produce sounded like the punch line to the “how do you get to Millinocket?” joke by Maine humorists Bert and I: you can’t get there from here.

But today, the popularity and growth of local, direct-to-consumer markets seems to know no end. Slowly and surely, we are redirecting the line from our farms directly to our tables. More and more farmers in Maine are growing for farmers markets. How did our homegrown produce get so out of reach in the first place?

The industrialization of agriculture in the 19th and 20th centuries, for one, changed what and how much farmers were growing and came to foster a stubborn “get big or get out” bias in the USDA. Because of the byzantine Maine-to-Massachusetts-and-back-again route, produce could actually be trucked in from large, midwest and western farms more cheaply than Mainers could grow and sell it at home. Smaller-scale farming that included market garden crops became increasingly unprofitable for the producers who supplied direct sales markets, while larger farms typically didn’t bother with these “miscellaneous” market crops.

Between 1920 and 1954, the number of Maine farms decreased more than 50 percent, but the average size of the farms increased 50 percent – from 103 to 155 acres, according to “Trends in Maine Agriculture,” a bulletin published by the agricultural extension service. Potato growers exemplified the trend – fewer growers with bigger farms and higher yields – almost twice the yield of the national average in 1954.

Unlike many other markets across the United States, the Portland Farmers’ Market survived World War II. As the late Russell Libby, former executive director of the Maine Organic Farmers and Gardeners Association (MOFGA), recalled in a 2012 speech: “I talked to a farmer who sold there. He and his siblings would load up their sedan and use all their gas coupons to come to Portland in the very shady Old Port, pop open the trunk, and they had whole chickens from the farm. ‘Protein!’ (the farmer) said, adding, ‘We did very well during World War II.’”

On the consumer side, the automobile and the growth of the interstate highway system takes some blame for the markets’ decline. Hordes of urban consumers across the U.S. packed for the suburbs and re-keyed their shopping preferences to the convenience of supermarkets, and their taste buds to prepared, frozen and processed foods. It’s a tale that’s familiar to everyone who is interested in local foods today: The supermarket produce section offered big, shiny fruits and vegetables that were bred to withstand long-distance transport, often at the cost of flavor and texture. Local and regional food systems declined, along with farmers markets.

Then the pendulum began to swing. In the late 1950s, canned soup casseroles were inescapable, yes, but American culinary horizons were slowly broadening, as cooking authorities like Dione Lucas, James Beard and Julia Child suggested that good cooking took time and that outcomes were only as good as ingredients. Slowly, consumers who had been charmed by the convenience of supermarket shopping began to lament their lack of access to local or regional farm produce, and they began to wonder where their food was coming from – or, perhaps, where it had gone.

By the time of the 1979 truckers strike, Maine had already begun the slow process of rebuilding its local food system. The back-to-the-land movement, with its emphasis on small-scale farming, self-sufficiency, and civic engagement, such as that modeled by Helen and Scott Nearing, added many to its numbers in the 1960s and ’70s. Though the total number of farms in Maine shrank another 50-plus percent between 1954 and 2012, the number of smaller farms was growing, along with farmers who were invested in their communities.

In 1971, MOFGA was formed, and the next year began the first organic certification program in the country. Congress passed the Farmer-to-Consumer Direct Marketing Act in 1976, which permitted the USDA’s cooperative extension agents across the nation to work with farmers and activists to organize markets. In 1977 Maine joined California as the first of the states to create regulations permitting the establishment of certified farmers markets. The regulations eased standardization requirements on such things as packaging for direct-market growers – a significant cost savings – and required that sellers be either the producer or a relative or employee of the producer. By 1986, MOFGA had brought its own version of an extension agent on board, who specialized in organic gardening, agriculture and pest control. MOFGA’s support of small farms – some of which grow exclusively for farmers markets – and sustainable farming methods has contributed much to the revival of Maine’s farmers markets.

Today, though farms are getting smaller, they are becoming more numerous and more productive. According to agricultural census data, direct-to-consumer sales of farm produce in Maine increased nearly 100 percent between 1978 and 2012, from about $4.5 million to $8.6 million. Farmers markets are included in those sales figures, along with other direct sale venues such as “pick your own” and roadside stands. While direct sales remain but a small percentage of the entire value of Maine’s produce – 3.2 percent of the total – that amount has more than tripled since 1978.

As for farmers markets, we’ve gone from a low of one lone market in the entire state in 1971 – the Portland market – to more than 100 now; many towns have started winter markets, too. The markets provide not only hyper-flavorful produce, meats, cheeses, baked goods and other farm-made products, but also the opportunity to try new things (White pumpkins! Purple carrots! Zebra tomatoes!) in a bustling, sociable atmosphere. Russell Libby once proposed that if every Maine family would commit to spending just $10 per week on locally produced food, it would translate into $100 million more circulating in the Maine economy, which in turn would help perpetuate the small farms that supply the markets. It turns out, you can get there from here.