The biggest changes, though, had less to do with the place than how I was traveling. In 1998, my time in Marrakesh was part of a six-month solo trip, a month of that in Morocco. What I later realized was that it could not be duplicated: A trip that came at just the right moment in my life, when I was unattached, but old enough to know what I wanted — and needed — out of travel.

I replaced my $10-a-night room at a hotel that no longer exists with the cheapest room I could find (140 euros a night, or about $162) at the lovely Riad Mena. (Riads — the term refers to a traditional home built around a courtyard, but is now used for bed-and-breakfasts that are often filled with flora, fountains and hammams, and generally owned by expats — are now everywhere.) I not only had a cellphone, but was active on Instagram, Twitter and Facebook; 20 years ago, I didn’t see the photos from my analog camera until I returned home.

But I could never get Marrakesh and Morocco out of my head. Soon after my trip, I started working at The New York Times and, years later, as an editor in the Travel section. This time, I could return as a journalist.

Since my first trip, Marrakesh has become Morocco’s premier tourist city. For decades it has attracted travelers, though at a much smaller scale. “Everybody knows everybody else in Marrakesh,” wrote the English author Peter Mayne in his 1953 memoir, “A Year in Marrakesh.” “At least everybody knows everyone who lives here — the tourists who come in for a look at the city and a taste of its delights don’t count, except to have francs taken off them.”