A baby goat just had been thrust into my arms when one of the girls got an idea. “Gift!” she exclaimed. “Gift for you!” Before I had time to worry that she meant the goat itself, 11-year-old Muna was running back to her family’s tent. She returned with a smile, holding a travel-sized tube of foot lotion in her palm. It was half used. “Gift,” she repeated. Her 13-year-old sister, Nida, was not to be outdone. It was her turn to disappear and return, this time with a plastic bracelet.

The girls would not take no for an answer. I fished the only object I had out of a pocket to give them in return: a pot of lip balm. “Oooh,” Muna said. “Thank you.”

Together, we returned to the shade of the tent, sitting cross-legged on goat-hair rugs. As their mother watched us shyly, pouring cup after cup of tea, they showed me their drawings, taught me Arabic words, asked me to taste the ball of jameed – a hard, chalky goat’s milk cheese, sun-dried on top of the tent – that they pressed into my hands. Across the partition, a handwoven blanket that separated the women’s and men’s quarters, I could hear as my guide to the desert chatted with his father in Arabic. A rooster crowed; one of the sheep baa-ed. The hearth filled the tent with the cosy smell of wood smoke.

This, I thought, was what I had come to Jordan to find.

You may also be interested in:

• Why Iraqis are so generous

• A village that requires approval to enter

• The railway that united Islam

By the time I arrived in Wadi Rum, I had been beginning to think my trip to Jordan was a mistake. I’d had high hopes for the tiny Middle Eastern kingdom. Friends had told me about its striking sights and delicious food. But they had gushed about one thing in particular: the country’s warmth and hospitality. That’s what I had been looking forward to most.

In my first 48 hours, I’d experienced little of it. In Aqaba, a resort town on the Red Sea where I began my journey, I was leered at, laughed at and, finally, groped. “Men here are not used to a woman alone,” one policeman shrugged. I wanted to shut myself in my hotel room and not come out again until my flight home.

Instead, I went to the desert.

*

Located near Jordan’s southern border with Saudi Arabia, Wadi Rum intrigues visitors with its undulating hills of white and red sand and unearthly-looking towers of rock. But the real reason to visit Wadi Rum isn’t the landscape. It’s the people who make their home here.

Many foreigners were first introduced to the area’s Bedouins by Wadi Rum’s most famous Western visitor, TE Lawrence – the British officer who adapted so completely to Bedouin life that he was nicknamed Lawrence of Arabia.

One aspect of Bedouin culture Lawrence described was the importance of treating guests well. This was so key, he wrote, it almost ruined the Arab Revolt. The Arabs had planned to raise the flag, announcing their revolution against the Turks, on arriving in Medina. But at the last moment, they were joined on their journey by a couple of Turkish military officers. Some thought the officers should simply be despatched – after all, they were about to be sworn enemies. But the Bedouin code of hospitality made this inconvenient. Technically, after all, they were “two uninvited guests to whom, by the Arab law of hospitality, [they] could do no harm,” Lawrence wrote. (The guests were escorted back to Damascus before the flag was raised).

In the decades since Lawrence’s visit, the Bedouin way of life has changed; closed borders have cut off their long-ranging, nomadic way of life, while technology and tourism have provided both opportunities and challenges.

But some tenets of Bedouin culture have remained surprisingly consistent.

“You want to know about Bedouin hospitality?” asked Attayak Ali al Zilabia, the director of the Bedouin Roads camp where I was staying, when I arrived at the village of Wadi Rum. “Don’t worry. We will show you hospitality.”

I soon realised that asking a Bedouin to explain hospitality was as superfluous as asking someone to describe how a sand dune feels between the toes. You don’t have to ask about it. It’s just there.

*

My guide to the desert was Abu Rashid, a slight, handsome man who wore his agal rope, the black cord that keeps his red-and-white shemagh (traditional Middle Eastern scarf) in place, at a rakish angle. (His full name, he told me with a laugh when I asked, was Sabbah Abu Rashid al Zalabiyah, but even that wasn’t complete: Bedouin naming practices mean that a man’s full name includes a first name, father’s name, grandfather’s name, specific tribe name and larger ‘parent’ tribe name).

It was easy to tell that Abu Rashid had lived his whole life in Wadi Rum. I quickly learned he could walk up near-vertical canyon walls as quickly and gracefully as a spider, make camels walking a mile away halt and look up by yodelling out a simple call, and, perhaps most impressively of all, keep his white thoab – the long, loose clothing traditionally worn by Bedouin men – pristine even after a day of scrambling through red sand dunes.

“I am Bedouin,” he would say with a shrug and a smile when any of these skills seemed to surprise me.

One day, Abu Rashid and I had been driving for an hour without seeing another human. The sea of sand turned from red to white, with streaks of purple in the distance. We had come far south of the central touristic artery, an area that – while wild – was dotted with overnight camps and well-known sights like Lawrence’s Spring, where Lawrence was said to drink (and where Peter O’Toole did, too, in the 1962 film Lawrence of Arabia).

I had lost any sense of where I was; even the dozens of rock formations, so bizarre they could have come from the Moon, were starting to look the same. I only knew that we weren’t driving in circles because Abu Rashid kept pointing out each pillar from our 4x4. “All of the mountains have names – all of them,” he explained. That applied as much to a ‘mountain’ no bigger than 10m high as it did to titans like Jebel Umm al-Ishrin, a massif that soars 700m above the sand.

At the end of the day, when I asked Abu Rashid to trace our route on the map, I was shocked to see that we’d covered only about one-fifteenth of the desert. I shouldn’t have been; Wadi Rum’s protected area alone is 720 sq km, about the size of the entire New York City metropolitan area, all five boroughs included. Abu Rashid knew every metre.

To those who were raised here, the desert is more than their backyard: it is home itself.

This, after all, is the meaning of the word Bedouin. It comes from bedu in Arabic – ‘desert dwellers’.

Bedouin I met throughout Jordan told me how they felt that their true home wasn’t a place with a bed and a roof, but the desert wilderness. This was true in Wadi Rum, too, where several guides said that even when there’s a tent available at the camps, they often prefer to sleep in an open-top 4x4 or even on the sand, under the stars.

*

Despite being a popular tourist destination, Wadi Rum remains wild today. The small village at the desert’s edge is its only fixed settlement. If you arrive with a car, you must leave it there: camels, donkeys and 4x4s are the only way through the desert. There are no signs or roads, and barely any mobile phone service, either.

As a result, seeing someone else in the desert almost always has been a cause for celebration. It has shaped a code of hospitality that is more than romantic; it’s pragmatic. Even if one day you are helping a stranger who stumbles upon your tent – hungry, thirsty and in need of a night’s sleep – the next time, you could be the one in need of aid.

Now, as we crossed from red sand to white near Um Sabatah, we ran into camels loping along slowly, nibbling at the bushes. Abu Rashid stopped the 4x4 and jumped out. He greeted the camel shepherd by name and gave him some food we were carrying with us, a pastry packaged in plastic. The shepherd wasn’t a cousin or Bedouin; he was an African immigrant, relatively new to Wadi Rum. But in the desert, everyone is a friend.

Later, Abu Rashid and I visited his 75-year-old father, Sheikh Ali Lafi al Zalabiyah. The sheikh goes to the village every week or so to visit his first wife and to get supplies and news. But his true home is the desert, where he lives with his second wife and his two daughters. His location changes every couple of months.

To reach him, we had to drive far south, just a couple of kilometres from the Saudi Arabian border. The family’s tent stood in the shade against a rock mountain. There was no other settlement, or person, within sight. As we entered, Ali Lafi smiled and gestured for me to sit.

“A guest is treated as a guest whether you know him or not, whether he’s a stranger or not,” he told me as Abu Rashid translated. “You should accept him either way. And by Bedouin tradition, when he arrives, you don’t ask where he came from. Maybe he just has come for a visit and he continues on his way. But if he stays more than one day, two days, maybe you ask him – because perhaps he wants to talk to you about something, or needs something. Then you have to ask him and if he needs help, you help him.

“But the most important thing is that you tell him ‘Welcome.’ Whether he is from the same tribe or a different tribe, from Jordan or outside of Jordan, he is a guest.”

When I asked which rules I should be following in return, he chuckled. “You are foreign,” Abu Rashid translated. “He accepts your behaviour because you are not Bedouin.” There was how I’d sat with the men, for a start: “If you were Bedouin, you would use the Bedouin system for women. When a lady comes, she goes straight to the lady place. And you would have to cover your body and your head. Your face is your choice.”

Assuming I were a Bedouin man, I’d be offered coffee, Ali Lafi went on. Once I’d finished one cup, if I wanted more, I should move my cup forward in a straight line, not lifting it up or down. If I didn’t want any more coffee, I should give the empty cup a little shake. And I should only have three cups: any more is seen as greedy.

But the coffee could symbolise that I needed something more than hospitality. “The man of the house, like my father, he would say, ‘Drink your coffee’,” Abu Rashid said. “The guest would say ‘No. We drink our coffee only if you do something for us.’ My father would say, ‘If I can do it, without breaking a rule of Allah, I will do it.’” That could be settling a blood feud (though those are rare these days, Abu Rashid said) or arranging a marriage (if the bride agrees). If he can do it, Abu Rashid said, he’ll say “Okay, drink your coffee.” And if he can’t? “The guest leaves angry,” Abu Rashid said, laughing.

Food should be offered, too. “If you have guests from far away, or you love them and they are your friends, you should kill a goat for them, if they agree to let you do that,” Abu Rashid said. The goat is to make mansaf: a traditional dish of meat, flatbread and rice, drizzled with a broth made from jameed, the same hard goat’s cheese I tried with the girls.

From killing the goat to cooking the yoghurt, mansaf takes several hours to make. So if guests are in a hurry, the alternative is zarb: a dish of vegetables and meat, like lamb, slow-cooked in an underground pit that is the Bedouin answer to barbecue. Although zarb can be left for two or three hours, it can also be ready in a third of the time, and it doesn’t need to be watched – making it a faster, and more convenient, alternative.

*

Several hours later, my wrist still adorned with the plastic bracelet Nida and Muna had given me, I was back at the camp, watching Abu Rashid and the camp’s cook, Muhammed, lifted a three-tiered grill arranged with lamb, zucchini and potatoes into a hole in the sand. Closing it with a lid, they shovelled it over with desert.

Over the next couple of hours, there was almost no sign that the zarb was being cooked: sealed beneath sand, not even the scent of smoke gave it away. After the sun had gone down, we ate in front of the campfire as one of the guides strummed a rebab, a traditional Bedouin string instrument. If this was the second-best meal for guests, it certainly wasn’t bad.

Welcome to Our House is a BBC Travel series celebrating human kindness in all its forms through uplifting, feel-good tales of hospitality and connection.

Join more than three million BBC Travel fans by liking us on Facebook, or follow us on Twitter and Instagram.

If you liked this story, sign up for the weekly bbc.com features newsletter called "If You Only Read 6 Things This Week". A handpicked selection of stories from BBC Future, Earth, Culture, Capital and Travel, delivered to your inbox every Friday.