The strangest border in the United Arab Emirates was created by the simplest of questions.
It was a question of tribal allegiance (of whom do you want to side with?) and it was posed, 70 years ago, by the leaders of the four rival clans who ruled the Musandam Peninsula to a group of elders of the east coast mountain village of Madha.
And while all the other villages and towns around them aligned themselves to the ruling families of what are now Sharjah, Fujairah and Ras Al Khaimah, the Madhanis were swayed by the local representative, or wali, of the sultan of Oman.
Nobody involved in the decision could have envisaged how an alliance of convenience made by a generally autonomous village in the first half of the 20th century would impact so greatly on their descendants, resulting years later in near neighbours facing dramatically different economic and social circumstances.
An eyewitness to the announcement seven decades ago said the villagers had summoned the leaders from the four clans to Madha for a meeting to discuss their allegiance.
"They were our guests and we feasted them," he recalled.
"Then they said to us, 'Who do you want?' And the people of Madha answered, 'Oman'. And from then on we were Omani."
The result is an international border that stands out even in the disjointed and discontiguous patchwork of different emirates that makes maps of the Hajar Mountains section of the UAE resemble a poorly stitched quilt.
Madha, a settlement of approximately 2,000 people, sits in a 75-hectare landlocked island of Oman, surrounded on all sides by the emirates of Sharjah, Fujairah and Ras Al Khaimah. But inside the Madha settlement is yet another tiny settlement, the village of Nahwa. Its 40 or so houses are entirely enclosed by Omani territory and form part of the emirate of Sharjah.
On a map, the arrangement looks like a misshapen doughnut and is one of only a small number of examples in the world of what is known as a counter-enclave, a patch of one nation contained wholly in the territory of another country that in turn is surrounded on all sides by the territory of the first nation.
Records indicate there are 32 such counter-enclaves and, in India and Bangladesh, even one counter counter-enclave. Most examples are to be found in Europe (where there are 14, including Campione D'Italia, an Italian enclave entirely within Switzerland) and areas of the former Soviet Union, where there are 16 such territories, including Savan, a Tajikistani enclave within Uzbekistan. The Madha-Nahwa settlements comprise the only counter-enclave in the Middle East.
However, in the study of counter-enclaves (several websites track the historical fortunes of such settlements), the subject quickly breaks down into various subdivisions, including those which exist to explain the quirks of history and geography, such as enclaved countries (there are three, including San Marino); independent territories that are near enclaves, such as Monaco (its stretch of coastline ensures it is not completely surrounded by France); and symbolic land gifted to a foreign country, such as the acre of southern England handed to the United States in the second half of the 20th century as a place to build a memorial to its fallen president, John F Kennedy. There are former enclaves, too, such as West Berlin, surrounded by East Germany during the Cold War years.
Seventy years after the elders of Madha aligned their village's fortunes with the sultan of Oman, a modern echo of that decision arrives as soon as you turn off the east coast motorway just south of Khor Fakkan and head to where a wadi emerges from the steep, rubble-strewn mountains. It comes in the form of an electronic bleep as your mobile phone registers an automated text message from Omantel advising that you are no longer in the UAE.
If not for the text, the unobservant might not even notice the crossing of an international boundary. Indeed, unlike the UAE's other borders with Oman and Saudi Arabia, there is no secure barrier restricting access.
But, for those familiar with this country's close neighbours, Madha, with its different architecture and narrower roads, has the feel of another country, that goes beyond the familiar ensign of the Emirates being replaced by the Omani flag.
Even when slowed by the speed bumps in the village, it takes less than five minutes before you cross a rutted and partially washed out ford on a wadi bed and emerge onto a suddenly smooth and wide curve of tarmac that signals you have recrossed the border into the UAE and arrived in Nahwa.
Such an intimation is confirmed within a short distance by the square white posts that mark the actual border and later the Sharjah police outpost that forms the start of "new" Nahwa, a village that was built from scratch only a dozen years ago.
Here, dramatic earthworks have created a plateau in what was once a bend in the crooked wadi and substantial villas have been constructed on the site, along with a network of well-maintained streets. All this is flanked by a large health centre and an even larger school where the village's children are taught for their first years of education, after which they take the bus to Khor Fakkan to further their studies. Nearby, in a large industrial shed, a generator hums away, providing power to the whole village.
And just beyond it, at the next bend in the wadi upstream, sits "old" Nahwa, featuring extensive and well-kept groves of date palms and other irrigated crops and a crescent of ramshackle shacks where the labourers who tend the plantation now live.
In one of the fields abutting new Nahwa we encounter Chamiz bin Ahmed Nahwi, a bright-eyed 68-year-old overseeing produce being readied to be shipped to market in Khor Fakkan.
He says he grew up here, back in the days before union in 1971, a time when almost no one had cars and the best way to get to the coast was to find a donkey or camel to ride on or to hitch a ride on a passing truck.
He attributes his good health to having lived off the land, eating only the gazelles he hunted or what his family grew. Hunting is banned now, but it's a moot point, he says, because there is nothing left to hunt anyway.
Not far away, we meet Ahmed Saeed Al Naqbi. His surname helps to explain why Nahwa opted to stay with Sharjah. Both Murba, a part of Sharjah emirate between Madha and the coast, and Daftah, a township farther into the Hajar mountains, are villages that are mostly Al Naqbi.
Ahmed commutes to work in Khor Fakkan each day but prefers to live in the clean air and country quiet of Nahwa, where he was born 29 years ago. He was 16 when the Emiratis moved from old to new Nahwa.
"A few years ago there was electricity but no school or hospital," he says. "Now we have all the facilities [we could ask for]. It's better now."
That evening, as we head back out towards the coast, we encounter Abdullah Mohammed Al Saadi, a 19-year-old agriculture student, who is chatting with his friends in the centre of one of the string of villages in the Madha enclave. He is representative of the way the borders and divisions in this area are simultaneously meaningless and yet insistent.
Like everyone in the valley, Al Saadi has friends in Nahwa, in Madha and in the greater UAE, a few kilometres away.
Thanks to Madha's decision to side with the sultan of Oman - based on the firm belief that it would be better placed to protect the village's water supply from avaricious neighbours - he and the others in the settlement, he asserts, are today at an economic disadvantage.
"They [Emiratis] have more money than us," he says. "It's tough because we have the salary of Oman, a small salary.
"Our grandfathers wanted Madha [to be] in Oman. Back then Oman had the advantage, now the UAE does. It was a big mistake by our grandparents. A big mistake."
Today, the true irony of the Madhanis' decision to side with Oman is that their judgement was swayed in part by being wealthier than the towns around them and wanting stronger government.
In the days before petrodollars, wealth was measured in terms of abundant water and fertile soil. Madha was blessed with both in a region where that was the exception rather than the rule.
Combined with the natural harbour at nearby Khor Fakkan, this was a place that was coveted by successive waves of invaders and settlers. Some graves in the area date back 3,500 years and coins from Alexander the Great's rule have been found in Madha.
First-hand accounts about life in the region were captured by teams of oral historians and social anthropologists commissioned by the government of Ras Al Khaimah to create a record of how life was before oil changed everything.
Five years' worth of research was collated by William and Fidelity Lancaster, a pair of British social anthropologists who specialise in the Arab world, and became Honour is in Contentment: Life Before Oil in Ras Al Khaimah.
In the book there are several firsthand accounts of the meeting at which Madha aligned itself with Oman.
Nowadays, being affiliated to the sultanate means Omani citizenship is based on a strict distinction derived from a line on a map. Until 1949 there were no such lines in this part of Arabia, just a selection of allegiances that would ebb and flow according to the shifting nature of tribal loyalties and changing assessments of the efficacy of the representation being offered.
Allegiance was often measured by a combination of from whom advice and arbitration would be sought to resolve intractable disputes within the tribe, and to whom zakat (charitable donations for the poor and needy) would be given.
Just to show how malleable the system was, sometimes arbitration would be sought from one clan and zakat paid to another.
"Traditionally there were no fixed or defined territorial boundaries between rulers, no nation state, and no concept of citizenship," the Lancasters wrote.
"Political allegiances were fluid and flexible, tax collection was the responsibility of the ruler, and tribes in the interior and remote coasts managed their own affairs."
Julian Walker, the former British consul who drafted the divisions between the emirates and also the UAE's external borders, did so after a gruelling and exploratory journey around the Emirates to find out where allegiances and influence lay.
Problems such as grazing and water rights, lawlessness and trade matters would almost inevitably be settled direct by opposing tribal leaders. Walker said villages such as Madha, Masafi and Al Rams "were said to have been independent or virtually so in the 1930s and 1940s".
One Ras Al Khaimah man described it this way: "In the old days, if a man needed to see the sheikh, he knew where the sheikh was, so he picked up his camel stick and went off, and found the sheikh sitting in the shade of a samra tree.
"He sat down and made his problem known to the sheikh, who gave his advice. That's hukm, government. Most of the time, people didn't need hukm; they sorted their affairs out with people they knew."
Another man explained it this way: "Governments aren't necessary. Everywhere used to have their own sheikh. They sorted out disputes and they dealt with the sheikhs of other communities. Apart from that, they weren't important; the important bodies in society were the families, they organised everything."
At the time, the dominant families and tribes of the region were the Shihuh, a small and isolated mountain-based tribe whose Arabic is still designated as an official separate dialect, the seafaring Qawasim of Sharjah and Ras Al Khaimah, the east-coast rulers known as the Sharqiyyin and the wali of the sultan of Oman. Until the Madhanis meeting, they had been aligned with the Shihuh from Dibba Bai'ah.
Names were rarely given by those who took part in the project, who were instead identified only by their tribal affiliation. One, a Bani Sa'ad from near Madha, said he had witnessed the meeting in Madha first hand.
"When I was a boy, there was the meeting in Madha to decide which ruler we should follow," he said.
"Both the Qawasim rulers came, the Sharqi of Fujairah, and the wali of the sultan of Oman from Suhar, and Muhammad bin Salih from Dibba Bai'ah.
"We had used Muhammad bin Salih as our hukm, government, our final arbitrator, hakkam, but then we felt there was no profit in remaining with him, we needed a stronger government."
Muhammed bin Salih was Shihuh and, up to that point, the Madhanis had been aligned with him, but had become unpopular because he was "too busy in Qawasim-Sharqi quarrels", the man said. "We chose Oman, because with Oman we had freedom, and because the wali, Hamad bin Saif Al bu Sa'idi, was a good man, a very good man."
Timing is vague but the best estimate is that this took place in the late 1930s or early 1940s.
Another whose words were recorded said the people of Madha felt "there was no profit in being with Muhammad bin Salih, they needed a stronger government than he could provide".
The wealth of the land meant Madha was often a prize to be fought over. At the start of the 19th century, it belonged to the Qawasim of Ras Al Khaimah but then the Shihuh took it back by force some time between 1869 and 1900.
"That finished the long period of fighting in the region which had started over Dibba Bai'ah and Dibba Al Husn," he said.
Years later, the discovery of oil and the relative prosperity that has flowed with it have washed away the natural advantages that Madha once enjoyed. Now its fertile soil feels like less of a prize and more of a relic from another era. Instead, it is an anomaly created by an old tribal gathering and the momentous decision that would reverberate from it, one which would forever cast two small villages into different countries. At such meetings, destinies are often shaped.
John Henzell is a senior features writer at The National.