The view from atop the nearly 900-year-old walls of one of the oldest inhabited forts in the world was distracting, to say the least.

Two hundred and fifty feet below me, the sandstone city of Jaisalmer in India’s Rajasthan resembled an earthen cubist painting of angular card-houses, surrounded by an endless sand-and-scrub landscape. Above it all, the evening sky glowed a dusky purple.

I had come to Jaisalmer, in the midst of the nearly 77,000-square-mile Thar Desert, to explore this ancient part of eastern Rajasthan and go on a three-day camel trek into the wilderness. Jaisalmer Fort, known as Sonar Quila or “Golden Fort” for the way sun lights its sandstone walls from amber to gold throughout the day, was a major draw for my visit.

Early in the morning, I headed to the office of Adventure Travel Agency. Two other travelers, three guides and I crammed into an old 4×4 for the predawn ride into the desert.

Unlimited Digital Access. $1 for 4 weeks.

Over the next three days we’d forgo showers, eat mostly vegetarian meals cooked over a fire and sleep on bedrolls spread out on dunes. Everything we needed we’d carry with us, and all of our trash we’d pack out.

After about 45 minutes in the truck, we debarked at the side of a road, where a half-dozen camels grazed on stubby trees near a temporary camp.

Once I was in the saddle, Deena, our 20-year-old lead guide, made a percussive “ck-ck” noise, abruptly sending the camel up on its hind legs and nearly pitching me over its head.

We passed by small mud-and-straw villages where women were dressed in brilliant red and yellow saris with gold-lace details, and men wore red, green or orange turbans. By late afternoon, I caught glimpses of wild antelope grazing.

We stopped to make camp at a sand dune rising out of the mostly flat landscape like the back of a serpent.

Exhausted from the long day, we unpacked our sleeping rolls and lay staring up at a clear sky filled with stars.

The second day was much like the first, but with more frequent stops at small villages. At each of our stops, a goatherd or a few children joined us to share our food and try on our sunglasses. At lunch, an extended family of 10 led us over a nearby ridge to their small compound, where they showed us their fields of guar and peanuts and offered freshly made goat or sheep curd.

“We found a goat,” Deena announced as we stopped to set up camp later that evening. “If you still want it, they will bring it here tonight, and we can make mutton curry and barbecue.”

For around 3,000 rupees (about $50 at 60 rupees to the dollar), we bought the animal, and an older relative of one of our guides slaughtered and butchered the goat according to halal tradition. By the time the meat was ready, we were three tourists, three guides and a half-dozen men from a nearby village, sitting around three fires and chatting about our lives.

As I lay under the stars, I was more ecstatic and more exhausted than I had been in a long time.