Here are two facts that might jolt your perception of current tensions in the Middle East. The first is that the empire which, at its height, had more Muslim subjects than any other empire ever – counting as subjects over one in three of the world’s Muslims – was the British Empire.

The second fact is that at the end of the First World War, Britain had more than a million soldiers in the Middle East, and in the years immediately following it cut up the map of the region into the shape it bears today, creating entirely new countries in the process and putting its nominees and clients into power in them.

A third fact lends significance to the first two: in 1911 Winston Churchill was First Lord of the Admiralty, in charge of Britain’s mighty Royal Navy, the vast police-force of the empire. Years of strikes by well-organised militant miners in the coal-fields of Britain had made Churchill worried that the far-flung fleets and therefore the empire itself could be held to ransom by – name of malediction! – socialists. He therefore ordered the navy to switch from coal-fired to oil-fired engines. That obliged Britain to help itself to parts of the world with oil wells: Persia was the first port of call, soon to be followed by British-created Iraq.

And how about a fourth fact: that imperial Britain never allowed any hostile power to threaten the approaches to its priceless milch-cow of India. That explained the struggles with Russia in Central Asia and Afghanistan in the nineteenth century; in the early twentieth century Germany’s friendship with the Ottoman Empire made Britain wary of any threat to its sea route through Suez and the overland route through Persia and Afghanistan. The British therefore took Egypt and Persia under its control, and when war began it poured troops into the region and fought very hard – and successfully – to destroy the Ottoman empire and dispose of its remains as it wished.

This tale has been well told a number of times, though because of the intricate complexity of the alliances, double-crosses and diplomatic and military shenanigans that infected the build-up to war and its conduct in the region, it has generated much controversy among historians. Who said what to whom, who did what when and why, who is to blame, what might have happened – the usual jungle of opinion finds lavishly fertile soil here.

All the more brilliant, therefore, is Sean McMeekin’s telling of this complex tale in The Berlin-Baghdad Express. He recounts the convolutions and involutions of detail, the ambiguities and equivocalities of intention, the necessities and urgencies of dangerous international entanglements, with remarkable clarity. His ostensible subject is the building of a railway from Berlin to Baghdad in the years before and during the First World War, a railway conceived by Kaiser Wilhelm of Germany as an artery along which the lifeblood of a new and mighty German empire would flow. Instead, one of its immediate consequences was the copious shedding of the more ordinary sort of blood.

As if the faltering line of that railway were a thread, McMeekin strings along it a tale of intrigue, callous calculation, human misery, skullduggery, cheating, revolution, murder and war. The result is not only wondrously fascinating in itself, but, alas for the mess that the world is in today, painfully educative.

Because of this angle of approach McMeekin brings a fresh perspective to the history of the Eastern Question, the Young Turk revolution, and Britain’s demolition of the Ottoman Empire – one of four empires to implode in that struggle: German, Austro-Hungarian, Russian and Ottoman, with a fifth (the British) beginning to bleed to death. He has an argument to put, and he does it convincingly, not least on the question of whether the German aim of promoting an Islam-wide jihad against Britain was a hasty 1914 improvisation or a more circumstantial plan resting on the already decades-long relationship between Berlin and Constantinople, which had begun in the enthusiasm for all things Islamic and Ottoman acquired by Kaiser Wilhelm (“Hajji Wilhelm”) on his state visits to the Sublime Porte and its territories.

It happens, though, that in the summer of 1914, as a result of the Young Turk revolution of several years before, German-Ottoman relations were at a low ebb, and the Wilhelmstrasse – Germany’s foreign ministry – had sent a not especially competent ambassador to Constantinople. In line with its own longstanding policy of playing the Great Powers off against each other, the Porte was keeping everyone guessing about its intentions in the coming conflict, and in fact was secretly exploring the possibility of alliances with all parties, not just Berlin. But when the crunch came the Young Turk government sided with Germany, in the process extracting hugely advantageous terms for itself from Berlin, some of it by trickery, as McMeekin recounts, and more of it by very astute use of the state of emergency then prevailing.

The importance of the story is enormous. As McMeekin says, “Few decisions in world history have been as fraught with consequences as Turkey’s entry into the First World War. From the closing of the Straits [the Bosphorus] for years to Russian commerce – a major cause of the economic upheaval which led to the Russian Revolution – to the creation of the modern Middle East out of the wreckage of the defeated Ottoman Empire, the Turks’ decision to fight in 1914 lies at the root of the most intractable geopolitical problems of the twentieth century, many of which are still with us today.”

The story is so complex and so richly told by McMeekin that no summary can do it justice: it needs to be read, and readers will mutter and shake their heads with wonder at every page. But a few salient points press for mention.

Under the influence of the irrepressible Middle Eastern scholar and enthusiast Baron Max von Oppenheim, the Germans devised the stratagem of having Jihad, Holy War, pronounced in fatwas (in Turkish, fatvehs) against all infidels except Germans, Austrians, Americans, and any other ally of the Porte or any significant neutral. Some thought this message was likely to prove confusing to fanatics bent on murdering anyone who did not look Turkish or Arab, and the thought proved prescient. Its main aim was to get the huge number of Muslim subjects of the British Empire to rise against their masters, thus saving Germany and its allies the trouble of defeating Britain themselves.

In the words of the American ambassador to the Porte, Henry Morgenthau, “the Kaiser’s desire” was “to let loose 300,000,000 Mohammedans in a gigantic St Bartholomew’s Day massacre of Christians.” One of the pamphlets distributed by the Germans blamed what it called “the state of degradation to which the World of Islam as arrived” on the European Christians who in India, Egypt and the Sudan had subjugated hundreds of millions of Muslims. And the worst of these “enemies of God,” said the pamphlet, were “the infidel English”. The pamphlet told Muslims everywhere “that from today Holy War has become a sacred duty and that the blood of the infidels in the Islamic lands may be shed with impunity (except those who enjoy the protection of the Muslim power and those to whom it has given security and those who confederate with it).” And in a phrase that remains chillingly resonant today, the pamphlet concluded, “The killing of the infidels who rule over the Islamic lands has become a sacred duty, whether it be secretly or openly; as the great Koran declares in its word: ‘Take them and kill them wherever you come across them’.”

As it turned out, the call for universal jihad was very patchily received. Some atrocities occurred, but hopes for a rising of Muslims against their British masters in India and Egypt did not materialize. Indeed when an abortive German-Turkish attack was made on the Suez Canal in 1915 the British troops repulsing it included Muslim soldiers from India.

Of interest also is the battle waged by the German-Ottoman alliance against the British for the loyalty of the Arabs. It was almost exclusively a battle fought with gold – and won by the British – because the Arab tribes, mainly devoted to inter-tribal feuding and looting, were an independent and largely irreligious group (except for the ferocious Saud clan, who were, as they remain, fundamentalist Wahhabis of an uncompromising kind; but no less keen on gold for all that) who did not take to European notions of military endeavour, and responded only to bribes of gold and weapons – which nevertheless never guaranteed their loyalty or aid.

An example was the chieftain Mumtas Bey, “who went so far as to promise the Ottoman army command that ‘he and his Bedouins would either die or raise the Ottoman flag on the Citadel in Cairo.’ Mumtas was then given enormous sums in gold, whereupon he disappeared into the desert.” He had in fact been scared off by a reconnaissance party of British troops; one of the German agents in Damascus wrote that this “squalid fiasco” was further proof that the Arabs were “cowardly and insubordinate”.

The Arabs accordingly earned the opprobrium of one of the more thoughtful Central Powers agents sent to induce them to fight for the Ottoman cause, the Austrian scholar Alois Musil. Besides decrying their incessant feuding, Musil objected to their taking twelve-year old girls as wives and concubines. The German commander of the Ottoman troops in Damascus, Friederich Kress von Kressenstein, agreed with him on this, and further noted with distaste how the Bedouins “regularly bought and sold women as chattels, with fathers often selling ‘pristine young daughters’ for proper riding camels or a mature date tree. Widows or divorcees, by contrast, would usually only fetch a pack animal in barter.”

Students of the era will know that T. E. Lawrence, doing with some panache and showmanship on the British side what Musil and Kress were attempting on the German-Ottoman side, cultivated the Hashemite Prince Feisal of the Hejaz as leader of the largely-cosmetic “Arab revolt” that British gold purchased, eventually making him King of the newly-invented Iraq (a Sunni put in place over a Shia people: good thinking.) McMeekin reports Feisal’s earlier dealings with the Germans, and quotes him saying to Max von Oppenheim in Constantinople, “I thank God that the interests of Islam are entirely identical with those of Germany…It is true that there is a difference in religion between Muslim countries and Germany. But in material interests relative to this world, differences over religion should never stand in the way of these reciprocal interests.” As this shows, almost everyone betrayed almost everyone else in that dirty war over the rotting Ottoman carcass.

Another complicating factor in this very tangled tale is Zionism. Germany encouraged the Zionists in the hope of promoting an uprising in the Pale against Russia, which meant that that it was prepared to make sympathetic noises about Jewish settlement in Palestine. But because this was inconsistent with their pro-Ottoman policy and their desire to recruit the Arab tribes for war against British Egypt, the Wilhelmstrasse dragged its feet over a public announcement to that effect–and were pre-empted by the Balfour Declaration. But this latter was also the outcome of a calculation that the British came to regret, another twist in the snarling tale McMeekin tells so well.

There is much more; from it one more thing to mention is that there can now be no place to hide for Turkish deniers of the Armenian massacres of 1915–or indeed for deniers of earlier Armenian massacres by the Ottomans, of which there were a number in the preceding decades. But this one, over which Turkey gets so hot under the collar, is exhaustively discussed by McMeekin, who in explanation (not excuse) of what happened anaylses the precarious military and supply situation for Turkey in eastern Anatolia in the light of an Armenian uprising. The events were appalling, even for a generally appalling war.

This is one of the essential books about the Middle East’s labyrinthine recent history, perhaps the most telling case of how a knowledge of history is necessary to an understanding of the present. And that fact makes one wish that McMeekin had written his book a decade or more earlier.