The Arab world has given birth to many thinkers and many inventions – among them the three-course meal and coffee. The best coffee bean is still known as Arabica, but it’s come a long way from the Muslim mystics who treasured it centuries ago, to the chains that line our high streets.

Think coffee, and you probably think of an Italian espresso, a French cafe au lait, or an American double grande latte with cinnamon.

Perhaps you learned at school that the USA became a nation of coffee drinkers because of the excise duty King George placed on tea? Today ubiquitous chains like Starbucks, Cafe Nero and Costa grace every international airport, and follow the now much humbler Nescafe as symbols of globalisation.

Coffee is produced in hot climates like Latin America, sub-Saharan Africa, Vietnam and Indonesia, and you could be forgiven if you thought it is a product from the New World like tobacco and chocolate. After all, all three became popular in Europe at more or less the same time, in the 16th and 17th Centuries.

In fact, coffee comes from the highland areas of the countries at the southern end of the Red Sea – Yemen and Ethiopia.

Although a beverage made from the wild coffee plant seems to have been first drunk by a legendary shepherd on the Ethiopian plateau, the earliest cultivation of coffee was in Yemen and Yemenis gave it the Arabic name qahwa, from which our words coffee and cafe both derive.

Qahwa originally meant wine, and Sufi mystics in Yemen used coffee as an aid to concentration and even spiritual intoxication when they chanted the name of God.

By 1414, it was known in Mecca and in the early 1500s was spreading to Egypt from the Yemeni port of Mocha. It was still associated with Sufis, and a cluster of coffee houses grew up in Cairo around the religious university of the Azhar. They also opened in Syria, especially in the cosmopolitan city of Aleppo, and then in Istanbul, the capital of the vast Ottoman Turkish Empire, in 1554.

In Mecca, Cairo and Istanbul attempts were made to ban it by religious authorities. Learned shaykhs discussed whether the effects of coffee were similar to those of alcohol, and some remarked that passing round the coffee pot had something in common with the circulation of a pitcher of wine, a drink forbidden in Islam.

Coffee houses were a new institution in which men met together to talk, listen to poets and play games like chess and backgammon. They became a focus for intellectual life and could be seen as an implicit rival to the mosque as a meeting place.

Some scholars opined that the coffee house was “even worse than the wine room”, and the authorities noted how these places could easily become dens of sedition. However, all attempts at banning coffee failed, even though the death penalty was used during the reign of Murad IV (1623-40). The religious scholars eventually came to a sensible consensus that coffee was, in principle, permissible.

Coffee spread to Europe by two routes – from the Ottoman Empire, and by sea from the original coffee port of Mocha.

Both the English and Dutch East India Companies were major purchasers at Mocha in the early 17th Century, and their cargoes were brought home via the Cape of Good Hope or exported to India and beyond. They seem, however, to have only taken a fraction of Yemeni coffee production – as the rest went north to the rest of the Middle East.

Coffee also arrived in Europe through trade across the Mediterranean and was carried by the Turkish armies as they marched up the Danube. As in the Middle East, the coffee house became a place for men to talk, read, share their opinions on the issues of the day and play games.

Another similarity was that they could harbour gatherings for subversive elements. Charles II denounced them in 1675 as “places where the disaffected met, and spread scandalous reports concerning the conduct of His Majesty and his Ministers”.

A century later Procope, the famous Parisian coffee house, had such habitues as Marat, Danton and Robespierre who conspired together there during the Revolution.

At first, coffee had been viewed with suspicion in Europe as a Muslim drink, but around 1600 Pope Clement VIII is reported to have so enjoyed a cup that he said it would be wrong to permit Muslims to monopolise it, and that it should therefore be baptised.

Austrian coffee drinking is said to have received a big boost when the Turkish siege of Vienna in 1683 was broken, and the European victors captured huge coffee supplies from the vanquished.

Perhaps that is why, to this day, coffee is served in Vienna with a glass of water – just like the tiny cups of powerful Turkish coffee with its heavy sediment in Istanbul, Damascus or Cairo. Is this just a coincidence, or a long forgotten cultural borrowing?

The beverage we call “Turkish coffee” is actually a partial misnomer, as Turkey is just one of the countries where it is drunk. In Greece they call it “Greek coffee”, although Egyptians, Lebanese, Syrians, Palestinians, Jordanians and others do not seem to care overmuch about the name.

But there are other coffee drinking traditions in the Arab world. The coffee which is native to the Gulf is bitter and sometimes flavoured with cardamom or other spices.

It is often served a decent interval after a guest has arrived – to serve it too soon might be an impolite suggestion of haste – and then once again before departure.

It often comes just before or after a small glass cup of black, sweet tea. The order in which the two beverages are served varies, and seems to have no significance. What is remarkable for a Western visitor is the idea that the two very different drinks should be offered in such quick succession.

Sadly, however, while coffee has gone truly global production has declined in Yemen, the victim of cheap imports and rival crops like the narcotic qat.

In 2011, Yemen exported a mere 2,500 tonnes although there are attempts to revive cultivation of the best coffee in its original home. Today, none of the Arab countries is listed among the world’s significant producers.