The coolest people in the world do not wear their baseball caps backwards or pierce their navels with diamond studs. They are old and their cool is subtle, carrying hints of wisdom and poise. Johnny Cash, Marlon Brando, Georgia O'Keeffe: We behold their weathered sangfroid and we are ineluctably intrigued.

As I was, years ago, watching the 1990 film "The Sheltering Sky." Based on a 1949 novel of the same name by the American expat Paul Bowles (1910-1999), the movie follows three aimless Americans who land in Bowles's adopted home, Tangier, Morocco, and wander south, only to be destroyed by primal Third World realities: thieves, mystical religion and illness. Bowles makes a cameo appearance as narrator, and, in the end, we see him watch one of the stars drift into an ancient Tangier cafe. He just stands there, motionless, an old man with white hair and rheumy gray eyes. All he says to the woman before him is, "Are you lost?" And yet somehow he embodies existential grace, and a link to a bygone era.

Bowles first lived in Tangier in 1931. During the '50s and '60s -- when the city was controlled by nine Western nations -- and for a brief time after Moroccan independence in 1956, he was the reigning spirit over a glamorous and largely gay artists' colony. Tangier loomed then as Paris had in the '30s. William Burroughs wrote Naked Lunch, the definitive novel of heroin addiction, in Tangier, tossing the manuscript pages onto the floor of his fleabag hotel as he typed (Jack Kerouac and Allen Ginsberg helped him assemble the trampled clutter of papers). The Rolling Stones' Brian Jones showed up to hear the mesmerizing Master Musicians of Jajouka. Timothy Leary came to Tangier, too, to lead experiments using mind-expanding mushrooms, and Bowles's novelist wife, Jane, hosted grand parties.

Jane Bowles was a lesbian whose marital bond was primarily literary, and around the time of her death, in 1973, Tangier's colonial flavor faded. The scene fizzled, and only Bowles remained. He wandered constantly, living for a time in Sri Lanka and Mexico, but always he came back to Tangier. In old photographs he wears white canvas trousers and a benevolent grin, smoking cigarettes on a long silver stem as exotic Morocco (The camels! The adobe forts with darkened slit windows!) shimmers behind him. He knew everybody in town, and yet he always retained that analytic detachment you hear in his cold-blooded Gothic prose -- in words such as these, from The Sheltering Sky: "The wind at the window celebrated her dark sensation of having attained a new depth of solitude."

Gore Vidal once wrote that Bowles "has few equals in the second half of the twentieth century . . . [He] has glimpsed what lies back of our sheltering sky." The Library of America last year published a 940-page compilation of Bowles's major works. But none of the three Bowles novels that followed The Sheltering Sky -- Let It Come Down (1952), The Spider's House (1955) and Up Above the World (1966) -- sold especially well, and late in life Bowles was known more as an icon than a writer. When he visited New York City in 1995, for the first time in more than four decades, there were two sold-out celebratory concerts at Lincoln Center, replete with standing ovations. His primary gift to Americans was a dream: Here was a man who flew free of the doldrums of Middle America to live with aplomb in a faraway place. I envied him. So when I was in Morocco last year with a spare week, I went to Tangier and searched for the ghost of Paul Bowles.

Tangier is on the temperate northwest coast of Africa, just 10 miles from Spain, across the Strait of Gibraltar, and washed in the breezes coming off both the Atlantic and the Mediterranean. But to the average Tanjawi, Europe is a distant dream. Tangier, population 600,000, is extremely poor, almost entirely Muslim, and, like many African cities, growing rapidly. Tangier is a place where you see an amputee child hunched on the sidewalk with a begging cup beside the dusty stub of his truncated leg. Much of Morocco's homegrown hashish travels through the port here, and the quieter beaches outside of town are a prime launch point for destitute Africans who risk their lives, and pathetically seek First World fortune, by sneaking makeshift boats across the strait, toward Spain. Old movies don't tell the whole story.

But still, I made sure that there would be a certain bohemian splendor to my Tangier visit. I stayed in the Kasbah, the mud-walled old fortress city overlooking the burgeoning metropolis, in a decrepit home rented (but not occupied) by three young American expats/artists who'd given Tangier a whirl after college, then fled. I'd met these fellows one night at a bar in New York's Greenwich Village, and in Tangier their painter friend, Abdel-Aziz Boufrakech, picked me up at the airport.

Aziz is 41. When he pulled up in his battered Citroen station wagon, I was unshaven and ragged from seven days in the Sahara, but Aziz just laughed when he saw me. "You will like the house," he said. "There's hot water for showers."

Aziz had lived in Paris, L.A. and Switzerland. Now he was married and raising three children according to Muslim law, pretty much, and painting tranquil and earthy Moroccan scenes that sold well in galleries. "You are inside four walls in Tangier," he said, "blocked. There are almost no other artists to talk to."

We turned onto a narrow side street, and at once there was an explosion of Mediterranean color: green doorways, turquoise shutters, splashes of soft red and lavender. We parked and walked into the Kasbah, where a few hundred people live, and there the streets were 10-foot-wide footpaths that wound through the ancient mud buildings and into dimly lit tunnels that led to massive wood doors.

I stowed my bags in the Americans' house, and then I strolled down to the Cervantes Theater, a splendid art deco building that drew international stars in Bowles's day. The building was shuttered. I visited the Grand Hotel Villa de France, where French romantic painter Eugene Delacroix stayed in 1831 as he sketched Tangier street life. All I could see through the locked gate was the weeds in the driveway.

Finally, I went to Guitta's Italian restaurant, a one-time beacon for expats. There were actually a few people there, most of them ancient white men dining alone. I talked to an eightyish British gentleman, who was wearing an ascot inside his bright mustard blazer, and he assured me, "There's still a few expatriates left. You can go down the boulevard and meet them, you know."

A broad-boned and ample old woman sat beside us, so we could see her in profile. She gazed into space, her arms crossed, her lower lip quavering slightly and her eyes burning with what I took to be an ire at the world in general.

"The matron," the Brit said tentatively. "She knows quite a bit of the history."

"Does she, um, speak English?"

She answered herself, without ever shifting her gaze. "I don't give interviews anymore," she said crisply. "And I don't like you talking to customers, either."

"Do you want me to leave?"

"You're finished here."

I left.

Gradually, Tangier blossomed for me. Bowles wrote that the city had "the classical dream equipment of tunnels, ramparts, ruins, dungeons, and cliffs," and the place seemed surreal to me, too. The streets twist over a series of seaside hills, scantly marked by signs, and often I'd find myself cracking out my map to get directions from strangers. They puzzled over the document as though it were in hieroglyphics. One man stared long and hard at the blank back of the map before shaking his head in confusion.

There are camels on the beach in downtown Tangier, and one afternoon, as I watched them pick at the grass amid some old ruins, I met a man named Omar Charif. Omar identified himself as a travel agent and said that he knew Aziz. He said he was his uncle. And beyond that, he'd been acquainted with Paul Bowles himself. "A very nice man," Omar said. "He spoke Arabic like a Moroccan."

Omar was 47 and wearing a green mesh baseball cap and plaid polyester trousers. Eventually he offered to show me the apartment in which Bowles lived the last two decades of his life. There are no official Bowles walking tours in Tangier. There is not even a Bowles museum, and I was curious to see where this excursion was going. So we meandered off the beach, then up a hilly, traffic-choked street and through a market, progressing at a dawdling pace.

It is no secret that Bowles, who was gay, had a fondness for the bronze-skinned young men of Morocco. Omar told me that he was once one of Bowles's favorites, and that he and Bowles had numerous trysts. "But that's life," he said with a gruff shrug. "That's life."

We kept walking. At one point, we crossed paths with a longhaired young German who waved curtly at Omar before rushing away. "That man," Omar confided, "is a very famous writer."

"What's his name?" I asked.

"I can't remember," said Omar.

"How much longer now?" I said.

"Soon, you know -- five minutes."

Roughly half an hour later, in the blazing sun just outside Bowles's apartment building, Omar paused at a cross light. "I am not a boy hustling you on the street," he said, his voice raspy and insistent, more proud than desperate. "I am a guide -- that is my job. And I am doing something very special for you, and afterwards, my friend" -- Omar cackled nervously, then clapped me on the back -- "you can do something for me. Right, my friend?"

"Right."

We went inside and knocked on the door of apartment No. 20, and, not getting an answer, we went downstairs, where the manager's daughter addressed us impatiently. "Mr. Paul Bowles," she said, "he is dead, and every week 20 people still come here. Why? His books are gone; the people who knew him are gone. Why? What do you want?"

Omar looked at me and shrugged, and then held out his hand.

The house I was staying in slowly filled up. By odd coincidence, several other itinerant friends of the renters wandered into town simultaneously, and at one point I was domiciled with a French painter, a Canadian documentary filmmaker, a British banker and a Moroccan photographer. We interviewed one another. The French painter said things like, "The culture in France is finished -- done." We drank a lot of beer.

Aziz kept a bemused distance from the whole scene. He did not drink because, he said, he wanted to set a good example for his children. But still he came by, evenings, in the spirit of hospitality, and we'd talk. He spoke of painting in a precise and workmanlike manner, sounding almost technical when he noted, "Matisse came here because of the light and the warm Mediterranean colors. And the colors came from the hand-embroidered clothes of the country people -- the Arabs who live outside of Tangier, in the Rif Mountains. You go up there and you'd think you were in Andalusia, in Spain."

Some days Aziz got some painting done. Other days one of his kids was sick, or he got tied up renovating one of the 10 houses he owns and rents out. He was unfazed either way, and I appreciated his long vision, his understanding that making a life as an artist is ultimately about making compromises -- about taking care of the kids and the mortgage (or whatever) as you try to remember, somehow, your original burning ambitions. It was nice to come to a place so far from home, and so steeped in crazy-artiste legend, and find an artist so steady.

I kept hearing stories about Bowles.

Abdessalam Akaaboune, a cafe owner, told me, truthfully, that Bowles persuaded the Rolling Stones to record the tune "Continental Drift" in Akaaboune's basement.

He also spoke of Bowles, age 88 and dying, being carried through the streets of the Kasbah in a plastic chair, so he could see the leader of the Jajouka masters play flute. "It was the last time he went out of his house," Akaaboune told me.

Every story I heard about Bowles depicted him not as a friend, really, but as a treasure -- an aloof and inscrutable icon.

I should have expected this. Bowles's autobiography, Without Stopping, was so unrevealing that Burroughs nicknamed it "Without Telling," and I'd read that, while living, Bowles had stymied hundreds of admirers -- hippies, grad students, journalists -- who'd come to Tangier in hopes of communing with the master. They were all welcome in his home, but he endured them silently, smoking hashish with a weary look on his face. "I don't know why he comes," he sighed to a reporter after one frequent guest left in 1991.

I can understand his disdain. I have my own doubts about the whole literary pilgrimage thing. We experience the nuance of books alone, in the mind, and what sings for us isn't really the place that inspired the writer. Rather, it's the place the writer invented -- a place you can't reach on a tour bus. For this reason, I have always been skeptical of guided tours to, say, the pubs of James Joyce's Dublin.

Still, I was hopeful that in Tangier I could somehow see through Bowles's patrician exterior and find some glimpse of the person beneath. This wasn't happening, in part because Bowles left behind very little tangible evidence. He fathered no children and, like most nomads, he was a minimalist; he didn't collect stuff. You'd think there'd at least be a gravestone in Tangier, but there is not. Paul Bowles's ashes were interred near his parents' graves in Lakemont, N.Y., in November 2000. A man named Joe McPhillips bore the urn west from Tangier.

McPhillips, 67, is the executor of Bowles's estate and also the headmaster of the American School of Tangier. I visited him at the school one morning. His secretary, an American, was typing on an electric typewriter, and McPhillips himself was enjoying a cigarette as he puttered about in a rumpled tweed jacket and wide-wale cords. The scion of an old Alabama family, he likened the school to his prep school alma mater, calling it "The Andover of the Mediterranean. We provide an old-fashioned education," he explained. "Students rise when adults come in the room. They read Lord Jim and 'Julius Caesar.' There's not a lot of ancillary nonsense in the curriculum."

McPhillips arrived in Tangier in 1962, following a Princeton classmate, and caught the last chapter of the city's halcyon era. He spoke wistfully of the "old days" when, he said, there were 100,000 Europeans in Tangier and "no traffic lights. You could walk into the Parade Bar and you knew everybody, and things were incredibly cheap," he said. "Tangier was small and charming then, and yet it was incredibly sophisticated. You'd go over to Paul and Janie's, and there would be Leonard Bernstein; there'd be Gore Vidal. That time will never be replaced."

Bowles had trusted McPhillips, I knew, because McPhillips was the last guardian of an old order -- and a man who bore this mantle seriously. After a few minutes, McPhillips opened the top drawer and with great care took out a plastic bag containing a passport -- the last passport Bowles ever owned. It was an American passport. McPhillips handed the document to me, and then gave me a minute with the hunched and withered old man in the photo. "You know," McPhillips said, "I asked Paul once, 'You've lived outside of America so long and you've traveled so extensively. Do you still feel American?' He simply said, 'I am American. I always will be.' "

"But he lived in Morocco for most of 60 years," I said. "Why isn't he buried here?"

McPhillips began shouting, literally screaming. "I can't tell you," he said, "how many people asked me, 'You're going to lug Paul Bowles all the way back to America?' Look, I am the executor of Paul Bowles's estate, and it was Paul Bowles's will to be buried in America. I can't just go and bury Paul Bowles wherever the hell I feel like it." McPhillips flung himself down on a couch, and then, depleted, red-faced, with a trail of smoke rising from his fist, he added, "Yes, I buried Paul Bowles in America."

The whole performance was a bit much, but McPhillips, who directs his school's theater program, enjoyed soliloquizing, and I enjoyed listening, so that evening I went up to his home, on Tangier's affluent Old Mountain Road, for drinks. He kept his necktie on for the cocktail hour. "I never saw Burroughs without a tie," he said, "and Paul, too, abhorred sloppiness. He lived within the frame, and the frame held everything together for him. If you don't have a frame, you fly off in all sorts of directions. But inside the frame you are secure; you can observe what happens. Paul came here to observe," McPhillips said, "and to write what he saw. He was fascinated with the exotic, and that fascination was rooted in his own New England Puritanism."

McPhillips's butler, Ali, came around now, with vodka tonics and a silver tray bearing Ritz crackers. Ali was a striking young man in a white waist jacket. He wore white satin gloves to deliver the food and the drinks and went barehanded at all other times. I took my drink, and then McPhillips and I went out onto the terrace, where it was dark and we could see the lights of the Moroccan coastline glittering below in the distance.

"Tangier has changed so much since Paul first arrived," McPhillips continued, "but it is indestructible; it will always have mythical qualities. Tangier is possessed of this very intense creative force -- it comes up out of the earth."

I knew what he meant, but way up high on the mountain, that earth force of Morocco seemed, like Paul Bowles himself, so far away.

The next day was the first day of Ramadan. Aziz was fasting and abstaining from all drink, even water. He offered me tea when I stopped at his house, but I felt weird about taking it, so we just sat there in his airy, tile-walled living room, awkwardly stoic, trying to make conversation as his giggly 4-year-old son, Jabir, took running dives into his lap.

My plan was to leave Tangier that morning and take the train a few miles south to a popular beach. But Aziz had friends in a more distant coastal village reachable only by bus, and he said, "It is beautiful in Moulay Bousselham. Why don't you go to Moulay Bousselham?"

That is what I ended up doing. I rode in the back of the bus, surrounded by young men who stared straight ahead, not eating, not talking, keeping the Ramadan fast. The bus wound to the edge of the city, where there were goats on the road, and then on into rolling potato fields. Almost no one spoke. They simply rode. Night fell; the fast ended. Strangers passed a sweet pastry called chebakia from seat to seat in the cramped, unlit bus. "Kul," said the man seated beside me. "Eat." The chebakia tasted of almonds and honey, and I looked in my guidebook and came up with "hada bnin" (this is delicious), and the man smiled and gave me another chebakia. Then the bus stopped.

A young man got on with a boombox blasting a haunting and undulating Ramadan tune and, as the bus started again, held the box to his chin and sang in high, soulful tones, his gaze cast into the distance. I could not tell which words came from the box, and which from his mouth, and I was aware suddenly of how little I understood the spiritual tides surging around me. I was not in control; I was outside the frame.

In time, of course, I would come back within the frame, back to my familiar habits of observing and writing. But right then, on the bus, I was learning how rich it is to venture into that strange territory of the mind where you are bewildered and vulnerable -- lost, even. I just listened to the music.

If You go

Tangier is far more than the old haunt of Paul Bowles. It's a 2,500-year-old city whose earthy, forlorn charisma can enchant anyone -- anyone, that is, who is willing to wander. There are very few designated tourist attractions here. To access Tangier's magic, you need to visit these places:

The Grand Socco. A teeming maze of narrow streets, the Grand Socco is a marketplace offering goods ranging from local pomegranates and dates to $2 pink plastic guitars. The best days to visit are Thursdays and Sundays, when the peasants from the nearby Rif Mountains come to sell produce. Haggling is de rigueur.

Club les Fils de Detroit. A small room in Tangier's ancient hilltop fortress, the Kasbah, the Detroit is where Tangier's desultory masters of Andalusian music gather to jam. The floors here are covered with Oriental rugs. The tea is prepared slowly, warmed on what looks like a Bunsen burner. Guests sit amid the musicians as the faint smell of hashish fills the air.

The cliffs overlooking the Atlantic. Narrow walkways in the Kasbah look down on the crashing waves; the paths wend past worn adobe houses crisscrossed with clotheslines. Strolling along, you'll understand why the Greeks and the Phoenicians first settled here: Ships are visible on two seas, from miles away.

Bill Donahue, a contributing editor for Outside magazine, lives in Portland, Ore. He will be fielding questions and comments about this article Monday at 1 p.m. at washingtonpost.com/liveonline.