In golden sandstone waves, Fes swoops downward from all sides. Hills speckled with olive trees and wild rosemary descend to a rolling valley that quickly condenses, buildings piling tighter, eruptions of ancient walls and massive arched gates—more than 17 by some counts—demarcating old from new.

That sliver of a valley, that teeming center that is home to hundreds of thousands of people and more than 10,000 shops, is the medina, the ancient market center of Morocco’s second-largest city. Head to the dusty reaches of Zalagh Mountain just north of Fes, and the sun bleaches the complexity woven below.

But step into the medina, and you enter a maze of dizzying intricacy, a car-free knot of some 9,600 alleyways that twist and tangle, studded with heaps of spices, produce and meats, where restaurants spill onto cobblestone streets, where handcarts jostle pedestrians with tankards of chickpea soup sold by the bowl.

It is a delicious chaos, for everywhere there is food. The 13th-century psychiatric hospital that’s now home to a spice market. The stalls where women toss massive sheets of oil-slicked trid pastry—something akin to a chewy crepe crossed with phyllo dough—over gas-fired domed hotplates shaped like steel balloons. The piles upon piles of olives and spice pastes.

And around every corner, there is bread. And it is the bread that brought me.

In Morocco, and particularly in Fes, bread is the heart of the meal. Every meal. And while there are numerous varieties, one stands apart. Sold in thick, flat wheat-flecked rounds puckered with seemingly random dimples, loaves of khobz might span a few inches or up to a foot. They also are ubiquitous, sold from carts and shops at every corner.

I encounter it the instant I step from the taxi on arrival, a man selling piles of it from a pull-cart at the edge of a roundabout. He’d be there dawn, day and dusk for the duration of my trip. And I encounter it that first evening at dinner, when a bevy of “salads” opens the meal. Seeing the salads, I start to understand.

As in Ethiopia, silverware is uncommon in Morocco. And with a cuisine built from endless iterations of stew-like dishes—even those salads are more like dips, spreads and braises than leafy greens—a bread such as khobz is essential, its lightly spongy crumb grabbing up tender chunks of spiced meat and vegetables while sopping in the savory-sweet sauces.

That first evening, the salads and khobz alone could make the meal. Cabbage braised with raisins and carrots; olives green and black dressed with herbs and oil; zaalouk, a harissa-rich mash of tomatoes and eggplant; bissara, a creamy fava bean and garlic soup; taktouka, a spiced mix of cooked tomatoes and peppers; and crevettes pil pil, plump briny shrimp bathed in garlic, olive oil and yet more harissa, Morocco’s de facto national spicy seasoning blend.

The bread, of course, ties it all together. But the culture of khobz runs stronger than was evident that evening. The act of baking itself is as important as the bread’s role in the meal. To understand that, I’d need to delve deeper into the medina.

In Fes, communal bakeries are the heart of the neighborhood, as essential as the hammam.

If khobz is the heart of the meal, the ferrane is the heart of the neighborhood. Along with a mosque, a public fountain, a Quranic school and a hammam, these communal bakeries are essential to the fabric of the community. Their rustic, wood-fired ovens bake not just the bread sold in shops and served in restaurants, but also the loaves of home cooks.

Abd Rezzak is 32 and has been working at Ferrane Talaa Sghira (literally, the Small Bakery of the Talaa Neighborhood) since he was 9, when his father first began teaching him the art. The dusky room is warm and yeasty, its blue-washed stone walls glowing from the fire in the massive oven set several feet into the ground, creating an almost subterranean feel.

Using a 12-foot wooden peel, Rezzak quickly hoists loaf after loaf of raw rounds of dough into the oven. Two at a time, he arranges them on the wide end of the peel, then dimples the tops with a stick. They emerge minutes later lightly browned and puffed. With fingers immune to the heat, he tosses them into piles that to the untrained eye seem random.

It’s anything but. Each day, he bakes some 3,000 loaves of khobz. Half will go to shops and restaurants. The others are prepared by women at home using recipes tuned to their tastes. And as the women of Fes have for centuries, they deliver those risen, raw loaves to their neighborhood bakery. Once the loaves are baked, the women return to collect them.

Those dimples? It’s how Rezzak marks each loaf to know to which family it belongs, an intricate identifying code literally baked into the process. He charges half a dirham for the service, or about 5 cents per loaf. Most families consider it well spent. Though the number of ferranes has dwindled as more women enter the workforce and lack time to prepare khobz at home, most Fassi people still prefer the taste of bread cooked in a wood-fired oven.

Tearing off a chunk of khobz fresh from Rezzak’s oven, I’m inclined to agree. The exterior is wheaty and textured, not crunchy, but delicately crispy. The interior is warm and tender, the crumb pocketed and giving. It’s begging to be dredged through a sauce or salad, something spicy and sweet.

“This tradition is starting to disappear,” explains Chakib Badrane, my translator. “In some quarters because of a lack of free time, some people might use their gas or electric oven at home, but believe me, it won’t be the same taste.”

To understand the process, I visit Houda Mehdi, a seamstress and home cook who lives a short walk from Ferrane Talaa Sghira. Her children are the sixth generation of the family to live in their 438-year-old home, the center of which is a white tile courtyard filled with fig and lime trees.

“The first thing girls learn is making the bread,” Mehdi explains. “Then the salads. Then the tagines.” Today, she will teach me her version of khobz, learned first from her mother, but perfected with her mother-­in-law. Studded with seeds, it has a nutty, savory complexity that beautifully complements the so-­often slightly sweet stews of Morocco.

The process is simple—white flour, semolina and wheat bran form the base. Sesame, flax and fennel seeds add pops of flavor and texture. A bit of yeast and warm water brings everything together. She kneads it briefly, standing in a bartal, or alcove, off the side of the courtyard. Shaped into rounds, the dough rises briefly as we sip mint tea.

When the loaves are lightly puffed, Mehdi transfers them to a wooden board and wraps them in a cloth. It’s a quick walk to Rezzak’s bakery. “May peace be upon you,” she greets him. “And upon you, ma’am.” Within minutes, the loaves are in and out of the 570°F oven, the scent of now-toasted fennel and flax hitting us before we even see them.

So simple. So delicious. But in Morocco, bread is not served alone. Mehdi also offers to walk me through two of my favorite salads—taktouka, a simple stew of tomatoes and peppers seasoned with garlic, sweet paprika, turmeric, cumin and harissa; and crevettes pil pil, shrimp poached in olive oil and garlic with yet another hit of harissa.

Both come together with ease. For the taktouka, everything is chopped and combined in a clay pot to simmer quickly on the stovetop. The flavors meld and melt, filling Mehdi’s tiny kitchen with warm spice and garlic. The shrimp cook even more quickly, emerging savory and briny and bracingly garlicky.

And once again, the bread ties them together, sopping in the rich, savory-sweet juices. It’s a wonderful lesson in the power of simple cooking and shared experience. An opportunity to experience the heart of a meal. And a community.