The Turbulent Life Of The First Man To Ban Coffee: Khayr Bey
Meta Description: Who was Khayr Bey, the Mamluk emir remembered as the first man to ban coffee? From slave soldier to governor, betrayal, war, and Ottoman rule, this is the turbulent story behind one of the strangest figures of the early 16th century.
Although I entered the subject through coffee, what is really being told here is history itself. I have always been particularly drawn to turbulent lives, power struggles, harsh turning points, and the strange outcomes they produce. Now I am going to introduce you to an extraordinarily colorful figure whose life almost resembles a Hollywood script, a man said to have been of Turkish, Circassian, or Abaza origin. What makes Khayr Bey interesting today is, most likely, that he is remembered as the first man in history to ban coffee.
But to truly understand Khayr Bey, some background is necessary. Because this is not simply the story of one man. It is also the story of a region, of a transfer of power, and of a deeply turbulent age.
When “Turkiye” Meant Mamluk Egypt
When people hear the word Turkiye, most will naturally think of modern Turkiye. But the historical side of the matter is much stranger. In medieval Arabic sources, the word “Turkiye” was also used not for a modern Anatolian state in today’s sense, but for the Mamluk order that once ruled in Egypt. The reason was simple: the military and political backbone of that order had been formed largely by people of Turkic origin. Indeed, some Arabic sources from the Bahri Mamluk period referred to the dynasty as the “State of the Turks” or the “State of Turkiye.” So the place meant here is not present-day Turkiye, but the harsh and unusual world of power in Mamluk-ruled Egypt.

Mamluk Sultanate (Dawlat al-Atrak or Dawlat al-Turk)
Mamluk history is not an ordinary dynastic story. It is an extraordinary model of power in which enslaved Turkish soldiers seized the state and turned into rulers. This was not a classical kingdom in which rule passed naturally from father to son within a fixed dynasty. The real backbone here was a rigid hierarchy made up of military slaves. Children of Turkish, Circassian, Abaza, and other origins were brought from the Caucasus and the steppe world, purchased as slaves, trained, Islamized, militarized, and placed at the center of the state. But the most striking part of the system was this: these slave soldiers did not merely serve the state, they rose within it. As they advanced, they acquired new slaves of their own, trained them within their own circles, built networks of loyalty, and in doing so both secured their own place and climbed even higher through their own mamluks.
In other words, the Mamluk order was not an ordinary system of slavery, but an extraordinary hierarchy of a military slave class constantly reproducing itself. Someone who entered as a slave today could become an emir tomorrow, and if he rose further, he could train his own slaves, build his own political circle, and in the end walk all the way to the sultan’s throne. We are talking about a military order in which one could literally begin life as a slave and die as the Sultan of Egypt. That is why Mamluk history is not just the history of a state, but an extraordinary political laboratory in which slave soldiers seized power in a land they did not know, in a region whose language they did not speak, and reproduced that power from within their own class.
Khayr Bey’s Rise In The Mamluk World
Khayr Bey too was a typical Mamluk figure shaped by this order. He entered the system as a slave soldier, drew attention with his abilities, and rose among the elite military cadres trained around the palace. One of the most critical duties of the Mamluks was to ensure that Muslim pilgrims coming from all across the Islamic world could travel safely on the road to Mecca. This did not simply mean organizing caravans; it meant constantly dealing with tribes posing threats along the Hijaz route, raiders, and regional instability. Under Mamluk rule, the Hijaz, meaning Mecca and Medina, was one of the most important elements strengthening the religious legitimacy of the Egypt-centered order. Protecting the pilgrimage routes was therefore not an ordinary military task, but directly a matter of political prestige. Khayr Bey rose within this harsh military world and became one of the important figures tied to the security order of the Muslim world’s holiest cities and the pilgrimage route. This role did not merely make him a military commander, it also made him part of the question of order and security around Mecca and Medina. In the last period of the Mamluks, the Red Sea and Hijaz line also faced external pressure: the Portuguese push extending into the Indian Ocean and the Red Sea. In the early sixteenth century, Portuguese influence in the region, even though it could not seize Aden, became a serious factor threatening Red Sea trade and indirectly the Mecca-Medina line.

Hajj Routes Map
The First Part Of His Life Remains In Shadow
It is here that the first chapter of that turbulent life, the life that would later write his name into history with coffee beans as the first man to ban coffee, disappears into mist. Information about Khayr Bey’s early years is scattered, fragmentary, and at times contradictory. What we know for certain is this: he was no longer an ordinary Mamluk slave. He had risen to an extremely important position within the state, had served as governor of Aleppo, and had become the man responsible for the order and security of Mecca and Medina.
The Rise Of Coffeehouses
It was precisely in the region under his administration that a new current was rapidly rising: coffeehouses. Coffee coming from Yemen was spreading in Mecca and its surroundings not only as a new drink, but also as a new habit of gathering people together and as a new public setting. For Khayr Bey, this would quickly cease to be a simple matter of consumption and would turn directly into a matter of order, authority, and politics.
Coffee could not remain an ordinary product found in nature. To be consumed, it had to be processed, roasted, ground, and brewed. But this process of preparation was not simple enough for every individual to carry out easily on his own. Before the necessary routines, equipment, and habits became widespread, the real life of coffee emerged in shared spaces of consumption. That is why the first true place of coffee was not the home, but the collective. Coffeehouses entered the stage of history at precisely this point. People began to drink coffee not alone, but together with others. In other words, from the very beginning coffee was not only a drink, but also an excuse to gather people together.
People met in these places, talked, met again, and talked again. At first the conversations remained limited to daily matters, but over time they expanded into broader subjects. Just as people sitting around a table today will eventually circle back to matters of the country, so too in the coffeehouses of that time the direction of conversation inevitably shifted toward affairs of state, local rulers, justice, order, and politics. Thus coffeehouses ceased to be merely places where coffee was drunk; they turned into places where news circulated, ideas collided, and public discussion began to take shape. In a short time, coffeehouses became not merely places serving beverages, but powerful public spaces producing ideas and disturbing rulers.
Why Khayr Bey Banned Coffee
Khayr Bey, who was governor of Aleppo, was not a particularly beloved ruler among the people because of his harsh temperament. Rumors that he was fond of music and drink also turned him into a figure frequently gossiped about by Muslims in coffeehouses. It was in exactly this atmosphere that coffee, traveling from Ethiopia to Yemen and from there to Mecca, became increasingly visible.
The Mamluk governor Khayr Bey declared coffee forbidden in 1511 and shut down all coffeehouses in response to the coffeehouses that had become gathering points for opposition. The dispute quickly grew and reached the upper ranks of Mamluk rule. In the middle of the tension between the Mamluks and the Ottoman state, the Anatolian Turkish sultanate Ottoman, which had made Istanbul its capital, even sultans were forced to debate whether coffee was forbidden or not. In the end, when it was decided that coffee was not forbidden, the reopening of the coffeehouses was allowed. What was banned in Mecca in 1511 was not really only coffee. What was banned was the power of the people gathering around coffee to speak. This was the first known banning of coffee in history, but it would not be the last. This was the first declaration of coffee as forbidden, but it would not be the last.
The Shift Toward The Ottomans
While trying to continue in office as his authority was shaken by decisions coming from the center during his governorship of Aleppo, Khayr Bey had begun to see very clearly that the tension between the Mamluks and the Ottoman state, the Turkish sultanate that did not recognize the Mamluk caliphate, was steadily growing. At exactly this point he made an extremely strategic move and began secretly making contact with the Ottoman side. Because his position was extremely dangerous: on one side stood the Sultanate of Egypt, on the other the rapidly approaching Ottomans, and Khayr Bey stood in the middle of these two worlds, governing a frontier province on behalf of the Mamluks. In such an atmosphere, survival depended not only on loyalty, but on aligning with the right side at the right moment.
Khayr Bey’s leaking of information to the Ottomans was driven not only by high politics, but also by personal calculation. He had realized that his own position was weakening and that the center was turning against him. Moreover, the lifting of the coffee ban had also damaged his authority and prestige. The very coffeehouses he had once tried to silence through pressure were reopening, and the spaces where coffee was drunk had begun to remind him of his political defeat. For Khayr Bey, therefore, the matter was no longer only a war between states, but also a struggle to save his own future.

Tension escalated further in this atmosphere, and conflict became unavoidable. In the end, the Mamluk order, which had once been referred to the “State of Turkiye,” faced on the battlefield in 1516 the Ottoman state that would, about four hundred years later, found modern Turkiye.
The Battle Of Marj Dabiq
At Marj Dabiq, the center of the Mamluk army was commanded by Sultan Qansuh al-Ghawri, the right wing by the governor of Damascus Sibay, and the left wing by the governor of Aleppo, Khayr Bey. So Khayr Bey was not an ordinary emir; a slave from Crimea was commanding the entire left wing of the Mamluk sultanate. The beginning of the battle did not look like total disaster for the Mamluks. Especially the attacks on the right wing put the Ottomans under pressure; according to some accounts, the Ottoman side even began to consider retreat, a truce, or withdrawal. But at exactly that moment the picture changed. Important commanders on the right were killed, panic began in the army. Sources say that one wing of the Mamluk army was withdrawn by a “traitorous” commander who had secretly established contact with the Ottomans. In the same line of interpretation, Khayr Bey is said to have pulled the Aleppo army from the battlefield, causing the collapse of the Mamluk army, and his sudden withdrawal is described as having given the Ottomans a rapid victory.

Battle of Marj Dabiq ( Selimname )
The fact that his forces were among the first to leave the field gave rise that very day to accusations of treason. In Egyptian chronicled memory, this move was remembered not as an ordinary retreat, but as the act that sold the fate of the battle; because when the left wing dissolved, the Mamluk order disintegrated, Sultan Qansuh al-Ghawri was left alone, and defeat turned into catastrophe. Khayr Bey was the man accused of maintaining secret contact with the Ottomans, of opening the door to Ottoman victory by withdrawing his army at the critical moment, and of remaining in Mamluk memory as a traitor. After the battle, he withdrew first to Aleppo and then to Damascus.

The Fall Of Egypt From Within
After Marj Dabiq, Khayr Bey was no longer only the emir who broke a wing on the battlefield, but the man who prepared the internal collapse of Egypt; as governor of Aleppo he had maintained secret contact with Selim, he passed to the Ottoman side after withdrawing in battle, and through that break the line from Aleppo down to Hama, Homs, and Damascus was effectively opened before the Ottomans. Even before Ridaniya, Egyptian beys were being called to submit to the Ottomans through him, and some modern studies openly state that Khayr Bey’s advice played a role in Selim’s march into Egypt; in other words, he was no longer the defender of the collapsing Mamluk order, but one of the internal guides of the Ottoman conquest. In January 1517, the Mamluks were broken once again at Ridaniya; the battle was short, Selim then entered Cairo, but the matter did not end there, because Tumanbay continued the resistance and the final reckoning ended with clashes near Giza. In the end Tumanbay was captured and brought to Cairo and in April 1517 he was hanged at Bab Zuwayla; thus Khayr Bey passed into history not only as the man who withdrew his army at Marj Dabiq, but as the key figure working on the Ottoman side in the chain that opened the road to Ridaniya, accelerated the fall of Cairo, and led to the death of the last Mamluk sultan.

The execution of the last Mamluk ruler, Tuman Bay, on 13 April 1517, after his capture following the Battle of Cairo (Tâcü’t-Tevârîh)
Khayr Bey As The Ottoman Man In Egypt
For the Ottomans, the conquest of Egypt was not merely a matter of winning a field battle; it was the task of dismantling the deep-rooted military, administrative, and social order the Mamluks had built over centuries and replacing it with a new sovereignty, and for that reason the most critical need of the conquest was a transition figure who knew the region, the Mamluk bureaucracy, and the networks of power from the inside. It was at this point that Khayr Bey became decisive. Coming from within the old Mamluk order and knowing the system stretching from Aleppo to Cairo, this man did not merely sit in Egypt as a governor on behalf of the Ottomans, but became the connecting link who broke the last Mamluk spell and tied the country to the order of the new Turkish sultan. After Selim’s conquest, the administration of Egypt had briefly been given to Yunus Pasha; but after his bad administration and corruption, Khayr Bey was appointed governor and ruled Egypt on behalf of the Ottomans until his death in 1522. After his death, the governors of Egypt began to be sent directly from Constantinople, that is, from the imperial center; this shows that Khayr Bey was not merely a temporary figure, but the founding transition figure of Ottoman Egypt tied to Istanbul.
Khayr Bey held divans, had the khutba proclaimed first in the name of Selim and then in the name of Süleyman, minted coins in the name of the Ottoman sultan, and followed a harsh policy of suppression in order to clear the remnants of the Mamluks from the field; by mercilessly crushing Mamluk emirs inclined toward revolt and those in contact with them, he broke the real possibility of the old order returning. When Selim died in 1520, the rebellion of the governor of Damascus, Janbirdi al-Ghazali, became his greatest test of loyalty, but Khayr Bey did not switch sides; he recognized the authority of Süleyman, remained on the Ottoman side, and prevented Egypt from breaking away again. For this reason, reading Khayr Bey merely as “the Mamluk emir who betrayed” remains incomplete; he was also the man who turned the last great residue of the Mamluk sultanate into an Ottoman province. The framework he established and helped settle was later reinforced by further regulations; in 1525 Ottoman administration was defined through a law code, and Egypt remained within the Ottoman political structure for a long time. In the most careful phrasing, Egypt lived within the sphere of Ottoman rule for roughly four centuries after 1517; although the de facto British occupation began in 1882, Ottoman allegiance continued legally until 1914. In other words, Khayr Bey was not merely a governor of a few years, but one of the hardest and most decisive men of a transition age, the man who pulled Egypt out of the Mamluk sultanate and placed it into an Ottoman framework that would last for centuries.
The Final Balance
He was taken as a slave, sold, fought, worn down in the deserts, rose, banned coffee, changed sides, spied, betrayed, served his masters, crushed rebellions, and in the end returned to Egypt, where he had once been sold as a slave, this time as an Ottoman governor. Well played bro, well played.