Isn't this the craziest, twistiest international borderline you've ever seen? Unless you've studied the hyper-enclaved border zone of Cooch Behar , between India and Bangladesh, it probably is. But why does it look like this? Is it the product of fractal mathematics? Was it drawn by an angry child? Or does its erratic course follow an extremely complex and interwoven settlement pattern?
The numbers are the decimal representation of Lat 31˚ 9' 50" N, Long 3˚ 37' 59" W, coordinates just east of this point.
None of the above. This is a particularly desolate stretch of the 1,000-mile-long border between Morocco and Algeria. Although both North African countries share a relatively densely populated stretch of Mediterranean coast, this part of their common border is far inland, in the empty wastes where the Atlas mountains meet the Sahara desert . So there is no good, practical reason for these thin fingers of either state to claw so deep into the other country's territory.
But if we switch this Google Maps image to satellite view, the borderline mystery dissolves into the folds of the local landscape. For this part of the Moroccan-Algerian border essentially is a contour line, demarcating where those faint Moroccan foothills of the Atlas finally give way to the Hamada du Guir , to the east in Algeria. The age-old process of erosion - occasional flash floods plague the area - has given this stretch of the border a particularly baroque flair; the twisting of the contour line is less pronounced further along either side of this bit of border.
Hi-lo countries: the border line is actually a contour line.
These crazy curves are a relatively unknown phenomenon, because they hide in plain sight. As the area's desolation warrants scant cartographic attention, few maps home in on this part of the world. And zooming out to a more frequented scale, the border seems a fairly conventional affair: On the coast, the border starts out as a river, the beautifully named Oued Kiss. Where the river loses itself in the mountains, their peaks take over as demarcation points. The border follows the ridge of the Beni Snous and Beni Bou Said ranges, and others further inland. Where there aren't any mountain ranges to follow, it clings to slighter elevations, or chooses a straight-line path until the next usable obstacle.
In very general terms, the border seems designed to include the High Atlas and Anti Atlas ranges in Morocco, leaving the plains to the east to Algeria. That principle has its weirdest consequence in the stretch of border shown on the maps above. But it is far from certain whether Morocco and/or Algeria agree with the course of their border as traced by Google Maps. However desolate many of the regions it transects, the Moroccan-Algerian border's exact location remains controversial.
In the early 1960s, Morocco went to war with Algeria over a few territories in the newly independent former French colony that it considered to be historically Moroccan. This so-called Sand War was the consequence of the poorly defined border between both countries. It had gained sudden prominence, first by the discovery of mineral resources in the area, then by the border's 'internationalisation'.
Vague borders: the Trinquet and Varnier Lines (in blue and red), and yet another judicial delineation between French and Moroccan power (in green); fixed borders in grey.
Back in 1845, the French in Algeria had solved the demarcation of their colony's huge southern desert area by agreeing with the then independent kingdom of Morocco that "a territory without water is uninhabitable, so boundaries are superfluous". This meant that the border needed to be demarcated only for 102.5 miles (165 km) south from the Mediterranean. When France eventually took over Morocco as well, a more comprehensive set of borders was attempted; but the Varnier and Trinquet lines, drawn in 1912 and 1938 respectively, were imprecise and/or misunderstood. In 1952, the French decided to transfer the provinces of Tindouf and Béchar, rich in oil, iron and other mineral deposits, from Morocco to Algeria. France perhaps considered that these resources would be easier to exploit from across the Algerian plains than over the Moroccan mountains.
These seeds of conflict blossomed into full-blown war in October 1963, which saw the Algerians field thousands of battle-hardened veterans from the War of Independence against a technologically superior Moroccan army, and the Moroccans build so-called Sand Walls, fortified with land mines, to stop Algerian guerilla attacks. The fighting, which claimed hundreds of lives, ground to a stalemate after barely three weeks, and a formal cease-fire was agreed in February 1964.
Resentment between both countries has continued to simmer - not in the least because it allowed both governments to brand internal opposition movements as 'unpatriotic'. When Morocco took over the former Spanish Sahara (a.k.a. Western Sahara) in 1975, it used the same Sand Wall strategy to isolate the Polisario Front. In further fallout of the Sand War, these Sahraoui rebels with an axe to grind with Morocco found a willing ally in Algeria, which to this day provides them with a sanctuary across that straight line in the sand that divides both Morocco and the Western Sahara from Algeria.
Greater Morocco, consisting of Morocco proper (in black), Western Sahara (in dark and light red), Spain's exclaves Ceuta and Melilla (also in light red), Mauritania and parts of Mali and Algeria (in grey).
Morocco's annexation of the Western Sahara, unrecognised by most countries, and its claims on Spain's territories on the North African coast , can be seen as the last gasp of the dream of a Greater Morocco, which was one of the motivations for the Sand War. This Grand Maroc was the irredentist dream to recapture all the territories once governed by the Moroccan Sultan, before the encroachment of Western colonialism reduced the state to one-fifth of its former self. In its maximalist expression, this Greater Morocco would encompass not just Western Sahara, but also Mauritania  entirely, plus large chunks of western Mali and western Algeria.
Bing Maps vs. Google Maps: Same zone, different border.
Greater Morocco no longer drives the political agenda in Morocco these days, but that doesn't mean that nationalist fervour is dead in the Kingdom. The continuing rivaly with Algeria, still motivated by the friction over the border issue , will see to that. In that light, it is worrisome that map providers other than Google Maps have a different take on this particular stretch of the border. Take Bing Maps for instance, which shows a less intricate course for the border in this area. Keeping in mind the divergence between border tension - historically high - and the actual precision of the border's demarcation - historically low - this discrepancy has the potential to turn nasty. If so, let's hope Morocco and Algeria set a higher standard than Nicaragua and Costa Rica, who nearly fought a shooting war over a similar cyber-cartographical discrepancy . If not, would this then be the first Bing Maps War?
Many thanks to Till Vallée, who wowed me with an image of this particular border stretch.
 And yet, many visitors to Morocco will be familiar with the tourist oasis of Merzouga, about 20 miles (32 km) west of the border. It is located on the edge of the spectacular Erg Chebbi, a 12 by 6 mile (20 by 10 km) enclave of some of Morocco's highest sand dunes (up to 450 feet; 150 m) in otherwise rocky surroundings. ↩
 A hamada is a rocky desert plateau, where sand has blown away; its opposite is an erg, which is an aggregation of sand into dunes. ↩
 A section of the anti-colonial movement in French-administered Mauritania was favourable to joining Morocco, but was defeated by the pro-independence camp. It took Morocco from 1960 to 1969 to recognise Mauritania's independence, perhaps because it still hoped the Mauritanians would see the error of their ways… ↩
 Even though the border issues were eventually settled by treaty in 1972, it took the Moroccan parliament until 1992 to ratify it. And still the definition of the border varies: to the Moroccans, it is 1,601 km long, but to the Algerians, it is only 1,559 km long. As Algeria does not recognise Morocco's annexation of Western Sahara, it does not include the 42-km stretch of its border with that territory as part of the Moroccan-Algerian border. A further indication of the institutionalised tension between both countries is the fact that all road and rail traffic between them has been and remains suspended since 1994. ↩