As she sprinted full-tilt through the souks of Marrakesh, past woodworkers' stalls and carpet shops and spice stands, through narrow alleys hung with fresh-dyed cloth and around tight corners heaped with vegetables, up crowded lanes where teenage boys hawked leather goods and down dark lanes where children begged for coins, my wife stepped on the hem of her long skirt—worn as a nod to modest Islamic custom—and began to fall.

I was too far behind to catch her. I'd lost my wind a quarter-mile back when our Moroccan guide, Hamnan Majoub ("You can call me Jubi," he'd told us), had broken into a run. His sandals flopped and his thick wool caftan swayed, but he had vowed to reach our destination—the Medersa Ben-Youssef, the city's medieval Koranic school—before it shut for the day. He kept his promise. Luckily, my wife recovered her footing. We arrived at the school with minutes to spare.

There we found ourselves in a sun-baked courtyard centered on a peaceful pool and surrounded by tiers of empty, monk-like student cubicles. Intricately carved Koranic texts covered the wooden walls and ceilings. It felt as if we were standing inside a living book. Jubi, arms crossed, struck a pose of humble reverence as we looked around. Clearly he was a pious man. When we'd finished absorbing the gorgeous decorative swirl and had peeked inside the mosque, he made a sort of "okay" sign with one hand, his thumb and forefinger joined to form a circle and his three other fingers sticking straight up.

"One God, three prophets," he said. "That is Islam. That is my religion." Jubi urged us to make the sign with him. When we did, he smiled.

"Now we return to the souks," he said, still breathing hard from our dash through the labyrinth. "Perhaps my young friends would like to buy a rug?"

In Marrakesh, a city of 1.5 million, the spiritual and the commercial form a densely interlocked mosaic. At the feet of soaring minarets sprawl cluttered bazaars abuzz with bargaining salesmen. They call to you, they touch you on the arm—anything to seduce you into browsing. It's a heady, potentially exhausting experience, so before my wife and I waded back into the souks we stopped for glasses of mint tea in the Place Jemaa-el-Fna, the public square.

We could have spent our whole trip in the square, and we almost did. For the price of a glass of tea (about a quarter; Morocco is astonishingly inexpensive) you can sit for hours in a rooftop cafe and watch what amounts to an impromptu circus on the street two stories below, which changes and swells as the afternoon goes on. Snake charmers sit with flutes under flapping canopies, serenading cobras. Men with monkeys perched on their shoulders solicit money for tourist photographs. Acrobats form human pyramids against the backdrop of the looming High Atlas mountains, while backflipping, cartwheeling dancers amuse the crowds. It's a scene that stops time, that melts hours into days. You start to forget what century you're in.

We finished our tea, and Jubi took command again. Official guides cost little in Morocco (about $5 to $10 a day) and they're more than worth it—if only to ward off their unofficial counterparts. A look from Jubi sent the hustlers scurrying, and soon we were in the carpet-selling district. Our budget, with just a tiny bit of stretching, might have accommodated a Berber rug, but we'd resolved only to look. It wasn't easy. A merchant led us down some stairs to a dungeon of lavish textiles. As his minions turned over colorful kilims, he pointed proudly to a wall of celebrity-customer photographs.

"Whoopi and Ted are my good, good friends," he informed us in French. "Their house has many rugs." I didn't know how to tell the beaming man that his Hollywood chums Goldberg and Danson had broken up some time ago.

That night and the next we ate dinner in the square, strolling from vendor to vendor beneath the stars and sitting on long wooden benches with the locals. Strings of bare white bulbs lit up small grills laden with hissing shish kebabs, fresh fish, and pink Moroccan sausages. Nothing we tried cost more than 50 cents; we declined to visit the numerous stands serving sheep's brains cooked in their own skulls. The last stand I stopped at served platters of escargots. To extract the snails from their shells, I selected one of a dozen bent-open safety pins impaled in a fresh lemon. Finished, I stuck the pin back into the fruit.

We spent the next couple of days without a guide, touring tombs and palaces and museums and napping away the afternoons in the city's lovely gardens. My favorite spot was the Jardin Majorelle. Designed in the 1920's by a French painter and currently owned by Yves Saint Laurent, the garden is tiny, dreamlike, and pristine. The walls are painted an otherworldly blue; the cobbled paths are yellow, pink, and green. Picnicking there is like waking up in Oz after a night of sleeping in a poppy field. Almost as relaxing and delightful were the Saadian tombs. Anything but gloomy, this enclosed royal cemetery from the 16th century was built by Sultan Ahmed el Mansour, the conqueror of Timbuktu and Marrakesh's most legendary king. Palms and cypresses shade the tombs, hedges of rosemary perfume the air, and elaborate archways lead from chamber to chamber. If every cemetery were like this one, there would be no need for heaven.

From the tombs it was an easy ride in a charmingly creaky horse-drawn buggy back to the souks—the city's magnetic center. We lost ourselves in the crazy-quilt alleys trying to locate a certain luggage shop that had caught my wife's eye the day before. The shop was stacked to the ceiling with leather bags marked with outlandishly inflated prices that, according to local custom, we were supposed to counter. A suitcase priced at $40 was finally sold to us for $20, but only after half an hour of bargaining and several attempts to leave the shop. My wife walked out with the bag, excited and pleased, but later we learned that we'd still paid more than necessary.

In Marrakesh, haggling is everything. One can't be too assertive in the souks. The day after buying the bag, emboldened, we bought a dozen colorful tea glasses, four polished cedar boxes, and two clay pots—all for $15, less than one-third the asking price. We sensed we'd been gotten the best of nonetheless and returned to our hotel to lick our wounds. We swam in the pool and lounged on the deck, drinking cafe au lait and reading mysteries. Like a lot of Marrakesh hotels, the Atlas Asni Hotel was a modern, cavernous structure obviously geared to package tours but pleasant and efficient anyway. Also, the place was cheap. Six nights there, plus the airfare from New York, for $699 a person.

Consequently, as our stay neared its end, we had yet to spend the remainder of our $1,000 budget. On our final night we treated ourselves to a six-course meal at El Diaffa, a 19th-century palace. The atmosphere was almost too romantic: a lamplit hall, low tables ringed by cushions, rose petals strewn on the floor, tall waiters in slippers. A supple belly dancer, not at all kitschy like those I've seen in movies or on TV, made breathtaking passes as we ate from a vast selection of salads and pickled vegetables. The portions of couscous were ridiculously abundant, and when our waiter, halfway through the meal, raised the lid on a pot of steaming tagine (a slow-cooked lamb-and-vegetable stew), I groaned in protest. A heaping platter of fresh fruit concluded the meal, but all I could eat was one bite of a banana. With a generous tip, the bill came to around $150, high for Morocco but reasonable anywhere else for such a feast.

Outside on the street, we hailed a horse and driver and rode to the Jmaa El Fnaa. We still had a few coins left and were determined to spend them all. We discussed how to do it. More tea?A leather wallet?A snake-charming show?There were endless possibilities. That was the beauty of Marrakesh, we'd learned.

It's a place where anyone with a pocketful of change and a sense of adventure is genuinely rich.

A week in Marrakesh for less than $1,000?Begin by booking the $699 package (based on double occupancy) for round-trip airfare from JFK, airport transfers, six nights' lodging, breakfast, and hotel tax. Rates increase for hotel upgrades, and the offer is restricted during certain weeks. For participating tour operators, call the Moroccan Tourist Office (212/557-2520).

Package $699
Meals $140
Taxis $30
Souvenirs $35
Guide $25
Massage $15
Total $944