Each week, Roads & Kingdoms and Slate publish a new dispatch from around the globe. For more foreign correspondence mixed with food, war, travel, and photography, visit its online magazine or follow @roadskingdoms on Twitter.

The skylarks sing as they swoop and swerve in the pre-dawn sky around date palm trees. More than 200 miles away from the clamor of Saudi Arabia’s capital city, Riyadh, my friend Yunus and I hit the main road and race the rising sun toward the carts and bids and boxes and auctions of the Unaizah Date Festival, the second-largest date extravaganza in the entire world.

Most storylines about Saudi Arabia center around the kingdom’s deep social conservatism, vast oil wealth, or geopolitical machinations in the greater Middle East. Yet to understand a country looking to modernize its economy and re-engineer its society all while retaining traditional power structures, the date market helps bring things into focus.

Since 1980, the date festival has grown into its present form, a 70-day auction in late summer, generating as much as $300 million through the sale of thousands of tons of dates. This year marked the debut of Unaizah’s brand new festival grounds, the results of extensive investments totaling more than $100 million in local money–a 2.5 million square foot complex arranged around a 37,000-square foot central plaza. The plaza can stock up to 9,000 date carts, which, in turn, carry an awful lot of dates.

It is hard to travel the countries of the Middle East and North Africa for long without consuming dates: lush pods of sugar and fiber wrapped around a slender (and easily avoided) seed. They come in blacks and yellows and reds and browns, enjoyed fresh or packed together until the huddled mass of fruit starts to caramelize into a single molten mass.

The fruit has long been a part of the land that now forms the Kingdom of Saudi Arabia, where for centuries Bedouin nomads were fueled by its calories as they traveled back and forth across the Arabian Peninsula. A millennium and some centuries ago, the Prophet Muhammad exhorted Muslims in the month of Ramadan to “Break your fast with a date, for it is purifying.”

Today, a date palm sits at the heart of the official emblem of Saudi Arabia, with two crossed swords guarding the symbol for the kingdom’s heritage.

Since the unification of the kingdom in 1932, however, Saudi Arabia has derived the overwhelming majority of its wealth from a very different set of natural resources. Vast reserves of oil and natural gas have fueled decades of economic development schemes, filled a bloated government bureaucracy with (mostly male) Saudi citizens, brought in millions of foreign workers, and propelled the country into the ranks of the G-20 economies.

As a result, the Saudi government is often at the mercy of global energy markets. Plummeting oil prices over the past three years have sent the economy into a tailspin. Economic headwinds have, in turn, spurred on a high-profile effort to reconfigure the Saudi economy around a more diversified export base and an innovative private sector; this project is known as Saudi Vision 2030.

As renowned as Saudi dates are worldwide, they’re unlikely to turn the economic tide in the kingdom. Yet this has not discouraged the organizers of the Unaizah Date Festival, who have created what is likely the most efficient free market in the entire kingdom.

Unaizah lies some 3½ hours northwest of Riyadh by car, down a steep drop from the central Najd plateau and across two separate seas of sand dunes (“Caution: Sandstorm Area” read signs along the road). Just to the north lies the regional capital of Buraidah, archrival city to Unaizah and host of world’s largest date festival (though not the best date festival is the subtext of every date-related conversation in Unaizah).

The market that hosts the Unaizah festival is enormous: a giant plaza as wide as a football field and twice as long. Things get moving early, before the desert sun turns the concrete surface into a hot plate.

“We’ll stop by at midnight, to check that all of the dates are fine,” explains Ali Muhammad al-Khuwaiter, a date merchant from Unaizah reselling a few surplus date boxes from the wholesale lots under the market’s titanic sunshades. “Right after the dawn prayer, everybody starts to appear, and it all wraps up at about 9 a.m.”

From the ground level, it’s hard to see past the hundreds of Saudis in white robes (plus a few other Gulf citizens) milling about the business end of the date cart trains, where jolly and less-than-jolly auctioneers call out the ever-escalating prices per box. A Filipino attendant offers Yunus and me small cups of weak Arab coffee as we pass his stand, and we sip it as we head into a maelstrom of buying, selling, packing, and shipping.

The crowd is overwhelmingly male, save a few women who appear to be quietly scouting out starting prices and date quality for upcoming auction lots. Indian and Pakistani porters brush by, maneuvering clutches of date-filled carts to the loading docks in the back while a few ne’er-do-wells (a rough translation for a colloquial term, derbawi) carry out minor acts of teen rebellion by wearing nonwhite robes and pestering us for Snapchat selfies.

Under all the chaos, though, lies market machinery of ruthless efficiency.

Trains of metal carts stretch far into the distance, held in perfectly straight lines by slender grooves cast into the concrete. Each night, dates are loaded up on the 15 trains from highest quality to lowest, ready to be rapid-fire auctioned off, detached from the train, and taken to waiting cars or trucks or even motorbikes.

The entire market lies on a slight downward incline, meaning the carts—engineered to ease up on internal brakes the more weight is placed on their shelves—roll forward nearly of their own accord from the sellers’ drop-off point to the buyers’ collection stalls.

“We applied physics in order to sell dates!” exclaims festival director Yusuf al-Dukhayel back at the command center, noting that the new setup needed just 35 full-time workers, compared with the old market’s 120.

A wide range of buyers are plying the field, including a few Emiratis and a Kuwaiti. Saleh, a native of Riyadh, drove up for the fourth year running, hoping to pick up a couple dozen boxes at wholesale prices for personal use. “If I bought these in Riyadh, I’d be paying 150, 160 riyals a box,” he says, gesturing to the cart of boxes behind him. “Here, I got them for 90 riyals each.” (Around $24.)

Others had grander ambitions. I’m introduced to Abdulrahman al-Kureida, a major exporter and the biggest trader on the floor that day, who promptly drags me alongside a series of carts and gets me in on the action. “Bid 55! … OK, now 57! … 59!” he tells me, laughing maniacally and filming me on Snapchat as I call out the numbers and try to calculate how much I’ll be spending if the other traders call his bluff. All seem content to outbid me and continue on with their purchases as we dart among the auction groups.

Once he calms down, al-Kureida, a native Unaizan, brings me to see his entire team of scouts, buyers, packers, and loaders hard at work meeting his marks for the season. “We laid down a plan at the start of the season to get 600,000 cartons of a single type of date. I have one employee for every auctioneer, along with two assistants to help keep track of prices and number of cartons.”

Most striking about all of this feverish economic activity is that it seems driven not by some top-down expert plan, but by Unaizans’ fierce dedication to putting their city on the map.

Even back in Riyadh, Unaizans were quick to remind me that they came from Unaizah rather than Qasim, the greater administrative region that contains the oasis town. Imru’ al-Qais, the most famous Arab poet of the pre-Islamic age, mentioned the city in recounting his journeys:

The edge of Unaizah came into sight—and with that, we knew it was time for rest and refreshment.

The town’s independent streak stems from a long-standing, if subdued, resistance to the kingdom’s efforts to impose a uniform sense of “Saudi-ness.”

“By God, we will protect our lands or die trying” was the message sent by Unaizans to future Saudi King Abdulaziz al-Saud in 1904, offering help in his efforts to unify the kingdom but pledging a fierce fight if not left in some degree of peace. As a result, the Al-Sulaim dynasty still governs Unaizah by written treaty, rather than by a member of the vast al-Saud family.

Saudi Vision 2030 may provide some official cover for Unaizah’s latest efforts to develop a local economy based around a local identity, given the shout-out in the plan to the “cultural richness and diversity” of Saudi Arabian society.

In a country where a government-approved religious edict once equated historic preservation with worshipping idols, I ran into quite a few efforts to restore historic buildings and revive traditional crafts from the pre-oil era, all of which highlighted a unique Unaizah identity rather than the Saudi nation writ large.

Even without the marquee concerts staged by the Vision 2030’s General Entertainment Authority, Unaizans and visitors to the village’s covered market enjoy being able to sit back, relax, and enjoy the sight of teenagers playing a local variation of red rover. Others crowd around to watch a magician perform some sleight-of-hand tricks or have photos taken in the traditional garb of another age with an increasingly bizarre assortment of props: swords, rifles, stuffed falcons.

Perhaps it’s too easy to idealize Unaizah, forgetting about the clear limits on the pace of social, economic, and especially political change across Saudi Arabia and, by extension, this city.

For one, Committee for the Promotion of Virtue and the Prevention of Vice (aka the religious police) may have seen their power scaled back in major cities but are still out in force in the countryside. As everybody seems to know everybody out here, even the furtive dating life of the major cities (the other kind of date) is all but nonexistent in smaller towns.

Back in the capital, concerns are mounting that the kingdom’s overarching transformation plans may prove too ambitious. As unemployment rates stubbornly continue to rise, civil servants and consultants are scrambling to revise strategy documents.

At the same time, the mere suggestion of any form of meaningful participatory government in the kingdom—aside from toothless municipal councils or a handpicked advisory committee—is unthinkable enough to be dismissed out of hand even in private discussions among Western-educated elites in Riyadh. Reforms will be led from above, not conceded to demands from below.

True, there is hardly any more formal democracy in Unaizah than in Riyadh while date production is likely dwarfed by government subsidies financed by oil income. Yet in trying to secure Unaizah’s reputation, the joint work of local rulers, merchants, and farmers has helped ensure that in one place, however briefly, everything works as it should.

The fruit of their efforts is reflected in the glint of the sun on a thousand date cart frames, echoed in the sound of a thousand date-lot bids. As the day begins to heat up in the mid-morning sun, we watch from the upper room of the command post as the last few date cart trains are auctioned off and rolled away. Already, attendants in tractors are hauling long chains of carts up to the top of the slope, reracking the system for another day of dates.