History of the Mamluk Sultanate

The history of the Mamluk Sultanate, an empire based in Egypt and Syria, spans the period between the mid-13th century, with the overthrow of the Ayyubid dynasty in Egypt, and 1517, when it was conquered by the Ottoman Empire. Mamluk history is generally divided into the Turkic or Bahri period (1250–1382) and the Circassian or Burji period (1382–1517), called after the predominant ethnicity or corps of the ruling Mamluks during these respective eras.
The first rulers of the sultanate hailed from the mamluk regiments of the Ayyubid sultan al-Salih Ayyub (r. 1240–1249), usurping power from his successor in 1250. The Mamluks under Sultan Qutuz and Baybars routed the Mongols in 1260, halting their southward expansion. They then conquered or gained suzerainty over the Ayyubids' Syrian principalities. By the end of the 13th century, through the efforts of sultans Baybars, Qalawun (r. 1279–1290) and al-Ashraf Khalil (r. 1290–1293), they conquered the Crusader states, expanded into Makuria (Nubia), Cyrenaica, the Hejaz, and southern Anatolia. The sultanate then experienced a long period of stability and prosperity during the third reign of al-Nasir Muhammad (r. 1293–1294, 1299–1309, 1310–1341), before giving way to the internal strife characterizing the succession of his sons, when real power was held by senior emirs.
One such emir, Barquq, overthrew the sultan in 1390, inaugurating Burji rule. Mamluk authority across the empire eroded under his successors due to foreign invasions, tribal rebellions, and natural disasters, and the state entered into a long period of financial distress. Under Sultan Barsbay major efforts were taken to replenish the treasury, particularly monopolization of trade with Europe and tax expeditions into the countryside.
The mamluk was an owned slave, distinguished from the ghulam, or household slave. After thorough training in fields such as martial arts, court etiquette and Islamic sciences, these slaves were freed. They were expected to remain loyal to their master and serve his household. Mamluks had formed a part of the state or military apparatus in Syria and Egypt since at least the 9th century, rising to become governing dynasties in Egypt and Syria as the Tulunid and Ikhshidid dynasties. Mamluk regiments constituted the backbone of Egypt's military under Ayyubid rule in the late 12th and early 13th centuries, beginning under the founder of Ayyubid rule, Sultan Saladin (r. 1174–1193), who replaced the Fatimids' black African infantry with mamluks. Each Ayyubid sultan and high-ranking emir had a private mamluk corps. Most of the mamluks in the Ayyubids' service were ethnic Kipchak Turks from Central Asia, who, upon entering service, were converted to Sunni Islam and taught Arabic. A mamluk was highly committed to his master, to whom he often referred as 'father', and was in turn treated more as a kinsman than as a slave. The Ayyubid emir and future sultan al-Salih Ayyub had acquired about one thousand mamluks (some of them free-born) from Syria, Egypt and Arabia by 1229, while serving as na'ib (viceroy) of Egypt during the absence of his father, Sultan al-Kamil (r. 1218–1238). These mamluks were called the 'Salihiyya' (singular 'Salihi') after their master.
Al-Salih became sultan of Egypt in 1240, and, upon his accession to the throne, he manumitted and promoted large numbers of his original and newly recruited Mamluks on the condition that they remain in his service. To provision his mamluks, al-Salih seized the iqtaʿat (akin to fiefs; singular iqtaʿ) of his predecessors' emirs. Al-Salih created a paramilitary apparatus in Egypt loyal to himself, and his aggressive recruitment and promotion of mamluks led contemporaries to view Egypt as "Salihi-ridden", according to historian Winslow William Clifford. Despite his close relationship with his mamluks, tensions existed between al-Salih and the Salihiyya, and a number of Salihi mamluks were imprisoned or exiled throughout al-Salih's reign. While historian Stephen Humphreys asserts that the Salihiyya's increasing dominance of the state did not personally threaten al-Salih due to their fidelity to him, Clifford believes that the Salihiyya developed an autonomy within the state that fell short of such loyalty. Opposition among the Salihiyya to al-Salih rose when the latter ordered the assassination of his brother Abu Bakr al-Adil in 1249, a task that affronted many of the Salihiyya and one which they largely rejected; four of the Salihiyya agreed to execute the controversial operation.
Tensions between al-Salih Ayyub and his mamluks culminated in 1249 when Louis IX of France's forces captured Damietta in their bid to conquer Egypt during the Seventh Crusade. Al-Salih believed Damietta should not have been evacuated and was rumored to have threatened punitive action against the Damietta garrison. The rumor, accentuated by the execution of civilian notables who had left Damietta, provoked a mutiny by the garrison of his camp in al-Mansura, which included several Salihi mamluks. The situation calmed after the intervention of the atabeg al-askar (commander of the military), Fakhr ad-Din ibn Shaykh al-Shuyukh.
As the Crusaders advanced, al-Salih died and was succeeded by his son al-Mu'azzam Turanshah, who was in the Jazira (Upper Mesopotamia) at the time. Initially, the Salihiyya welcomed Turanshah's succession, with many greeting him and requesting confirmation of their administrative posts and iqtaʿ assignments at his arrival to the Egyptian frontier. Turanshah nevertheless challenged the dominance of the Salihiyya in the paramilitary apparatus by promoting his Kurdish retinue from the Jazira and Syria as a counterweight to the predominantly Turkic Salihiyya.
Before Turanshah's arrival at the war front with the Crusaders, the Bahriyya, a junior regiment of the Salihiyya commanded by Baybars al-Buduqdari, defeated the Crusaders at the Battle of al-Mansura on 11 February 1250. On 27 February, Turanshah arrived in Egypt from Hisn Kayfa, where he had been emir since 1238/1239, and went directly to al-Mansura to lead the Egyptian army. On 5 April 1250, covered by the darkness of night, the Crusaders evacuated their camp opposite al-Mansura and began to flee northward towards Damietta. The Egyptians followed them into the Battle of Fariskur where the Egyptians destroyed the Crusaders on 6 April. King Louis IX and a few of his surviving nobles surrendered and were taken as prisoners, effectively ending the Seventh Crusade.
Turanshah proceeded to place his own entourage and mamluks, known as the 'Mu'azzamiya', in positions of authority to the detriment of Salihi interests. On 2 May 1250, a group of disgruntled Salihi officers assassinated Turanshah in his camp at Fariskur. According to Humphreys, al-Salih's frequent wars against his Ayyubid relatives likely voided the Salihiyya's loyalty to other members of the Ayyubid dynasty. Nonetheless, the Salihiyya were careful to portray the assassination of Turanshah not as an assault against Ayyubid legitimacy, but rather an act against a deviant of the Muslim polity. An electoral college dominated by the Salihiyya convened to choose a successor to Turanshah among the Ayyubid emirs, with opinion largely split between al-Nasir Yusuf of Damascus and al-Mughith Umar of al-Karak. Consensus settled on al-Salih's widow, Shajar ad-Durr.
Shajar ad-Durr ensured the Salihiyya's dominance of the paramilitary elite, and inaugurated patronage and kinship ties with the Salihiyya. In particular, she cultivated close ties with the Jamdari (pl. Jamdariyya) and Bahri (pl. Bahriyya) elements of the Salihiyya, by distributing to them iqtaʿ and other benefits. The Bahriyya were named after the Arabic word bahr, meaning 'sea' or 'large river', because their barracks was located on the Nile River island of Roda. They were mostly drawn from among the Cumans-Kipchaks who dominated the steppes north of the Black Sea. Shajar al-Durr's efforts and the lingering desire among the military in Egypt to maintain the Ayyubid state was made evident when the Salihi mamluk and atabeg al-askar, Aybak, attempted to claim the sultanate, but was prevented from monopolizing power by the army and the Bahriyya and Jamdariyya, which asserted that only an Ayyubid could exercise sultanic authority. The Bahriyya compelled Aybak to share power with al-Ashraf Musa, a grandson of Sultan al-Kamil.
Aybak was one of the eldest Salihi mamluks and a leading member of al-Salih's inner circle, despite only being an amir awsat (middle-ranking emir). He served as the principal bulwark against the more junior Bahri and Jamdari emirs, and his promotion to atabeg al-askar was met with Bahri rioting in Cairo, the first of many incidences of intra-Salihi tensions surrounding Aybak's ascendancy. The Bahriyya and Jamdariyya were represented by their patron, Faris al-Din Aktay, a principal organizer of Turanshah's assassination and the recipient of Fakhr ad-Din's large estate by Shajar al-Durr; the latter viewed Aktay as a counterweight to Aybak. Aybak moved against the Bahriyya in 1251 by shutting their Roda headquarters in a bid to sap Aktay's power base. Aybak was unable to promote his own mamluks, known as the 'Mu'izziya', to senior posts until 1252. That year, he managed to dispatch Aktay to Upper Egypt to suppress a Bedouin uprising. Instead of isolating Aktay, as Aybak intended, the assignment allowed Aktay to impose extortionate taxes in Upper Egypt and provide him the funds to finance his patronage of the Bahriyya. In 1254, Aybak had his Mu'izzi mamluks assassinate Aktay in the Citadel of Cairo.
Afterward, Aybak purged his retinue and the Salihiyya of perceived dissidents, causing a temporary exodus of Bahri mamluks, most of whom settled in Gaza, but also in Upper Egypt and Syria. The purge caused a dearth of military support for Aybak, which led to Aybak's recruitment of new supporters from among the army in Egypt and the Turkic Nasiri and Azizi mamluks from Syria, who had defected from al-Nasir Yusuf and moved to Egypt in 1250. The Syrian mamluks were led by their patron Jamal ad-Din Aydughdi and were assigned most of the iqtaʿ of Aktay and his allies. Aybak felt threatened by Aydughdi's growing ambitions. After Aybak learned of Aydughdi's plot to topple him and recognize al-Nasir Yusuf as Ayyubid sultan, which would likely leave Aydughdi as practical ruler of Egypt, Aybak imprisoned Aydughdi in Alexandria in 1254 or 1255.
Meanwhile, the Bahriyya faction in Gaza commanded by Baybars etreated al-Nasir Yusuf to invade Egypt and dislodge Aybak, but al-Nasir Yusuf initially refused. In 1256, he dispatched a Bahri-led expedition to Egypt, but Aybak and al-Nasir Yusuf's army did not engage in battle. Aybak was assassinated on 10 April 1257, possibly on the orders of Shajar al-Durr, who was assassinated a week later. Their deaths left a relative power vacuum in Egypt, with Aybak's teenage son, al-Mansur Ali, as heir to the sultanate. During Ali's reign, Aybak's former close aide, Sayf ad-Din Qutuz, acted as strongman. His relations with the Salihiyya, including the Bahri mamluks, were similarly hostile.
By the time of Aybak's death, the Bahriyya had entered the service of al-Mughith Umar of al-Karak, who agreed to invade Egypt and claim the Ayyubid sultanate, but al-Mughith's small Bahri-dominated invading force was routed at the frontier with Egypt in November. The Bahriyya and al-Mughith launched a second expedition in 1258, but were again defeated. The Bahriyya subsequently raided areas around Syria, threatening al-Nasir Yusuf's power in Damascus. After a first attempt to defeat the Bahriyya near Gaza failed, al-Nasir Yusuf launched a second expedition against them with the Ayyubid emir al-Mansur Muhammad II of Hama, resulting in a Bahriyya defeat at Jericho. Al-Nasir Yusuf then besieged al-Mughith and the Bahriyya at al-Karak, but the growing threat of a Mongol invasion of Syria led the Ayyubid emirs to reconcile, and Baybars's defection to al-Nasir Yusuf. Qutuz deposed Ali in 1259. Afterward, he purged and/or arrested the Mu'izziya and any Bahri mamluks he could locate in Egypt in a bid to eliminate his potential opposition. The surviving Mu'izzi and Bahri mamluks went to Gaza, where Baybars had created a shadow state opposed to Qutuz.
While mamluk factions competed for control of Egypt and Syria, the Mongols under the command of Hulagu Khan had sacked Baghdad, the intellectual and spiritual center of the Islamic world, in 1258, and proceeded westward, capturing Aleppo and Damascus. Qutuz sent military reinforcements to his erstwhile enemy al-Nasir Yusuf in Syria, and reconciled with the Bahriyya, including Baybars, who was allowed to return to Egypt, to face the common Mongol threat. Hulagu sent emissaries to Qutuz in Cairo, demanding submission to Mongol rule. Qutuz had the emissaries killed, an act which historian Joseph Cummins called the "worst possible insult to the Mongol throne". Qutuz then prepared Cairo's defenses to ward off the Mongols' threatened invasion of Egypt, but after hearing news that Hulagu withdrew from Syria to claim the Mongol throne, Qutuz prepared to conquer Syria. He mobilized a 120,000-strong force and gained the support of his main Mamluk rival, Baybars.
The Mamluks entered Palestine to confront the Mongol army that Hulagu left behind under the command of Kitbuqa. In September 1260, the two sides met in the plains south of Nazareth in the Battle of Ain Jalut. Qutuz had some of his cavalry hide in the hills around Ain Jalut (lit. 'Goliath's Spring'), while directing Baybars's forces to advance past the spring against Kitbuqa's Mongols. In the ensuing half-hour clash, Baybars's men feigned a retreat and were pursued by Kitbuqa. The latter's forces fell into a Mamluk trap once they reached the spring, with Baybars's men turning around to confront the Mongols and Qutuz's units ambushing the Mongols from the hills. The battle ended in a Mongol rout and Kitbuqa's capture and execution. Afterward, the Mamluks recaptured Damascus and the other Syrian cities taken by the Mongols. Upon Qutuz's triumphant return to Cairo, he was assassinated in a Bahri plot. Baybars subsequently assumed power in late 1260, and inaugurated Bahri rule.
Baybars rebuilt the Bahriyya's former headquarters in Roda Island and put Qalawun, one of his most senior associates, in command of it. In 1263, Baybars deposed al-Mughith of al-Karak based on allegations of collaboration with the Mongol Ilkhanate of Persia, and thereby consolidated his authority over Islamic Syria. During his early reign and at heavy expenditure, Baybars rebuilt and stringently trained the Mamluk army, which grew from 10,000 cavalry to 40,000, with a 4,000-strong royal guard at its core. The new force was rigidly disciplined and highly trained in horsemanship, swordsmanship and archery. Baybars's military and administrative reforms cemented the power of the Mamluk state.
A major component to Baybars's rule was intrastate communication. To accomplish this, he instituted a barid (postal network) that extended across Egypt and Syria. The need for smooth delivery of correspondence also led to the large scale repair or construction of roads and bridges along the postal route.
Through opening diplomatic channels with the Mongols, Baybars also sought to stifle a potential alliance between the Mongols and the Christian powers of Europe, while also sowing divisions between the Mongol Ilkhanate and the Mongol Golden Horde. His diplomacy was additionally intended to maintain the flow of Turkic mamluks from Mongol-held Central Asia.
With Bahri power in Egypt and Muslim Syria consolidated by 1265, Baybars launched expeditions against the Crusader fortresses throughout Syria, capturing Arsuf in 1265, and Halba and Arqa in 1266. According to historian Thomas Asbridge, the methods used to capture Arsuf demonstrated the Mamluks' grasp of siegecraft and their overwhelming numerical and technological supremacy". Baybars's strategy regarding the Crusader fortresses along the Syrian coast was not to capture and utilize the fortresses, but to destroy them and prevent their potential future use by new waves of Crusaders.
In August 1266, the Mamluks launched a punitive expedition against the Armenian Cilician Kingdom for its alliance with the Mongols, laying waste to numerous Armenian villages and significantly weakening the kingdom. At around the same time, Baybars's forces captured Safed from the Knights Templar, and shortly after, Ramla, both cities in interior Palestine. Unlike the coastal Crusader fortresses, the Mamluks strengthened and utilized the interior cities as major garrisons and administrative centers. Campaigns against the Crusaders continued in 1267, and in the spring of 1268, Baybars's forces captured Jaffa before conquering the major Crusader fortress of Antioch on 18 May.
Baybars initiated a more aggressive policy than his predecessors toward the Christian Nubian kingdom of Makuria on Egypt's southern border. In 1265, the Mamluks launched an invasion of northern Makuria, and forced the Nubian king to become a vassal of the Mamluks. Around that time, the Mamluks had conquered the Red Sea areas of Suakin and the Dahlak Archipelago, while attempting to extend their control to the Hejaz (western Arabia), the desert regions west of the Nile, and Barqa (Cyrenaica). In 1268, the Makurian king, David I, overthrew the Mamluks' vassal and in 1272, raided the Mamluk Red Sea port of Aydhab.
Louis IX of France launched the Eighth Crusade, this time targeting Tunis with the intention of eventually invading Egypt. Louis IX's death was used by the Mamluks as an opportunity to refocus their efforts at the conquest of Crusader territories in Syria, including the County of Tripoli's Krak des Chevaliers fortress, which Baybars captured in 1271. Despite an alliance with the Isma'ili Shia Assassins in 1272, in July 1273, the Mamluks, who by then considered the Assassins' independence as problematic, wrested control of the Assassins' fortresses in the Jabal Ansariya range, including Masyaf.
In 1275, the Mamluk governor of Qus, with Bedouin allies, launched an expedition against Makuria, defeating King David in the Battle of Dongola in 1276, and installing Shakanda as king. This brought the fortress of Qasr Ibrim under Mamluk jurisdiction. The conquest of Nubia was not permanent and the process of invading the region and installing a vassal king would be repeated by Baybars's successors. Nonetheless, Baybars' initial conquest led to the annual expectation of tribute from the Nubians by the Mamluks until the Makurian kingdom's demise in the mid-14th century. Furthermore, the Mamluks also received the submission of King Adur of al-Abwab further south. In 1277, Baybars launched an expedition against the Ilkhanids, routing them in Elbistan in Anatolia, but withdrew to avoid overstretching his forces and risk being cut off from Syria by a second, large incoming Ilkhanid army.
Baybars attempted to establish his Zahirid house as the state's ruling dynasty by appointing his four-year-old son al-Sa'id Baraka as co-sultan in 1264, representing a break from the Mamluk tradition of choosing the sultan by merit rather than lineage. In July 1277, Baybars died en route to Damascus, and was succeeded by Baraka. The latter's ineptness precipitated a power struggle that ended with Qalawun being elected sultan in November 1279. The Ilkhanids took advantage of the disarray of Baybars's succession by raiding Mamluk Syria, before launching a massive offensive against Syria in the autumn of 1281. Qalawun's forces were significantly outnumbered by the estimated 80,000-strong Ilkhanid-Armenian-Georgian-Seljuk coalition, but marched north from Damascus to meet the Ilkhanid army at Homs. In the 28 October battle of Homs, the Mamluks routed the Ilkhanids and confirmed Mamluk dominance in Syria. The defeat of the Ilkhanids enabled Qalawun to proceed against the remaining Crusader outposts in Syria. In May 1285, he captured the Marqab fortress and garrisoned it.
Qalawun's early reign was marked by policies intended to garner support from the merchant class, the Muslim bureaucracy and the religious establishment. Among these were the elimination of illegal taxes that burdened the merchants and extensive building and renovation projects for Islam's holiest sites, such as the Prophet's Mosque in Medina, the al-Aqsa Mosque in Jerusalem and the Ibrahimi Mosque in Hebron. After the détente with the Ilkhanids, Qalawun ordered mass arrests to suppress internal dissent, imprisoning dozens of high-ranking emirs in Egypt and Syria. The détente coincided with a refocusing of Qalawun's building activities to more secular and personal purposes, including a large, multi-division hospital complex in Cairo. Construction of the hospital, a contrast from his Mamluk predecessors' focus on establishing madrasas, was intended to garner public goodwill, create a lasting legacy, and secure his spot in the afterlife. Its location facing al-Salih Ayyub's tomb demonstrated Qalawun's lasting connection to his master and honored the Salihiyya. While the Salihi mamluks were typically Kipchak Turks, Qalawun diversified mamluk ranks by purchasing numerous non-Turks, particularly Circassians, forming out of them the Burji regiment.
Qalawun was the last Salihi sultan and after his death in 1290, his son, al-Ashraf Khalil, drew his legitimacy as a mamluk by emphasizing his lineage from Qalawun. Like his predecessors, Khalil's main priorities were organization of the sultanate, defeat of the Crusaders and the Mongols, integration of Syria into the empire and preservation of the flows of new mamluks and weaponry. With regards to the last policy, Baybars had purchased 4,000 mamluks, Qalawun 6,000–7,000 and by the end of Khalil's reign, there was an estimated total of 10,000 mamluks in the sultanate. In 1291, Khalil captured Acre, the last major Crusader stronghold in Palestine and Mamluk rule consequently extended across all of Syria.
Khalil's death in 1293 led to period of factional struggle, with Khalil's prepubescent brother, al-Nasir Muhammad, being overthrown the following year by a Mongol mamluk of Qalawun, al-Adil Kitbugha, who in turn was succeeded by a Greek mamluk of Qalawun, Husam ad-Din Lajin. To consolidate his control, Lajin attempted to redistribute iqtaʿat to his supporters. He was unable to retain the sultanate and al-Nasir Muhammad was restored to power in 1298, ruling over a fractious realm until being toppled by Baybars II, a Circassian mamluk of Qalawun, who was wealthier, and more pious and cultured than his immediate predecessors.
Early into al-Nasir Muhammad's second reign, the Ilkhanids, whose leader, Mahmud Ghazan, had converted to Islam, invaded Syria and routed a Mamluk army near Homs in the Battle of Wadi al-Khazandar in 1299. However, Ghazan withdrew most of his troops from Syria shortly after due to a lack of fodder for their numerous horses and the residual Ilkhanid force retreated in 1300 at the approach of the rebuilt Mamluk army. Another Ilkhanid invasion in 1303 was repelled after the Ilkhanid defeat at the Battle of Marj al-Suffar in the plains south of Damascus.
Baybars II ruled for roughly one year before al-Nasir Muhammad became sultan again in 1310, this time ruling for over three decades in a period often considered by historians of the Mamluks to be the apex of both the Bahri regime specifically and the Mamluk Sultanate in general. To avoid the experiences of his previous two reigns where the mamluks of Qalawun and Khalil held sway and periodically assumed the sultanate, al-Nasir Muhammad began efforts to establish a centralized autocracy. Early into his reign, in 1310, al-Nasir Muhammad imprisoned, exiled or killed any Mamluk emirs that supported those who toppled him in the past, including the Burji mamluks. He then assigned emirates to over thirty of his own mamluks. Initially, al-Nasir Muhammad left most of his father's mamluks undisturbed, but in 1311 and 1316, he imprisoned and executed most of them, and again redistributed emirates to his own mamluks. By 1316, the number of mamluks in the sultanate decreased to 2,000. Al-Nasir Muhammad further consolidated power by replacing Caliph al-Mustakfi (r. 1302–1340) with his own appointee, al-Wathiq, as well as compelling the qadi (head judge) to issue legal rulings advancing his interests.
Al-Nasir Muhammad being a son of a mamluk instead of a mamluk himself risked undermining his position among the largely mamluk elite. This partly explains his purges of the thousands of mamluks purchased by his predecessors. Amid conditions that stemmed the flow of mamluks from the Mongol-held lands to the sultanate, al-Nasir Muhammad resolved to compensate the reduction of mamluks by adopting new methods of training and military and financial advancement that introduced a great level of permissiveness. This manifested in significantly relaxed conditions for new mamluks and encouraged the pursuit of military careers in Egypt by aspiring mamluks outside of the empire, to the point that parents would sell their children to be mamluks so they would enjoy an improved standard of living.
Under al-Nasir Muhammad, the Mamluks successfully repelled an Ilkhanid invasion of Syria in 1313 and then concluded a peace treaty with the Ilkhanate in 1322, bringing a long-lasting end to the Mamluk-Mongol wars. After the détente, al-Nasir Muhammad ushered in a period of stability and prosperity in the sultanate through the enactment of major political, economic and military reforms ultimately intended to ensure his continued rule and consolidate the Qalawuni-Bahri regime. Concurrent with his reign was the disintegration of the Ilkhanate into several smaller dynastic states and the consequent Mamluk effort to establish diplomatic and commercial relationships with the new political entities. Al-Nasir Muhammad also attempted to assert permanent Mamluk control over the Makurian vassal state, launching an invasion in 1316 and installing a Muslim Nubian king, Abdallah Barshambu. The latter was overthrown by Kanz al-Dawla, who al-Nasir Muhammad temporarily ousted in a 1323/24 expedition.
Al-Nasir Muhammad died in 1341 and his rule was followed by a succession of his descendants in a period marked by political instability. Most of his successors, except for al-Nasir Hasan (r. 1347–1351, 1354–1361) and al-Ashraf Sha'ban (r. 1363–1367), were sultans in name only, with the patrons of the leading mamluk factions holding actual power. The first of al-Nasir Muhammad's sons to accede was al-Mansur Abu Bakr, who al-Nasir Muhammad designated his successor. However, al-Nasir Muhammad's senior aide, Qawsun, held real power and imprisoned and executed Abu Bakr and had al-Nasir Muhammad's infant son, al-Ashraf Kujuk, appointed instead. By January 1342, Qawsun and Kujuk were toppled, and the latter's half-brother, al-Nasir Ahmad of al-Karak, was declared sultan. Ahmad relocated to al-Karak and left a deputy to rule on his behalf in Cairo. This unorthodox arrangement, together with his seclusive and frivolous behavior and his execution of loyal partisans, ended with Ahmad's deposition and replacement by his half-brother al-Salih Isma'il in June 1342. Isma'il ruled until his death in August 1345, and was succeeded by his brother al-Kamil Sha'ban. The latter was killed in a mamluk revolt and was succeeded by his brother al-Muzaffar Hajji, who was also killed in a mamluk revolt in late 1347.
After Hajji's death, the senior emirs of al-Nasir Muhammad hastily appointed another of his sons, the twelve-year-old al-Nasir Hasan. Coinciding with Hasan's first reign, in 1347–1348, the Bubonic Plague arrived in Egypt and other plagues followed, causing mass death in the country, which in turn led to major social and economic changes in the region. In 1351, in reaction to Hasan's attempted to assert executive power, the senior emirs, led by Emir Taz, ousted and replaced him with his brother, al-Salih Salih. The emirs Shaykhu and Sirghitmish deposed Salih and restored Hasan in a coup in 1355, after which Hasan gradually purged Taz, Shaykhu and Sirghitmish and their mamluks from his administration. Concurrently, Hasan began recruiting and promoting the awlad al-nas (descendants of mamluks who did not undergo the enslavement/manumission process) in the military and administration, a process that lasted for the remainder of the Bahri period. This caused resentment among Hasan's own mamluks, led by Emir Yalbugha al-Umari, who killed Hasan in 1361.
Yalbugha became the regent of Hasan's successor and the young son of the late sultan Hajji, al-Mansur Muhammad. By then, mamluk solidarity and loyalty to the emirs had dissipated. To restore discipline and unity within the Mamluk state and military, Yalbugha applied the rigorous educational methods used for mamluks during the reigns of sultans Baybars and Qalawun. In 1365, an attempt by the Mamluks to annex Armenia, which had since replaced Crusader Acre as the Christian commercial foothold of Asia, was stifled by an invasion of Alexandria by Peter I of Cyprus. The Mamluks concurrently experienced a deterioration of their lucrative position in international trade and the economy of the sultanate declined, further weakening the Bahri regime. Meanwhile, the harshness of Yalbugha's educational methods and his refusal to rescind his disciplinary reforms provoked a mamluk backlash. Yalbugha was subsequently killed by his own mamluks in an uprising in 1366. The rebellious mamluks were supported by Sultan al-Ashraf Sha'ban, who Yalbugha had installed in 1363. Sha'ban rule as the real power in the sultanate until 1377, when he was killed by mamluk dissidents on his way to Mecca to perform the Hajj.
Sha'ban was succeeded by his seven-year-old son al-Mansur Ali, though the oligarchy of the senior emirs held the reins of power. Among the senior emirs who rose to prominence under Ali was Barquq, a Circassian mamluk of Yalbugha who was involved in Sha'ban's assassination, and Baraka, another of Yalbugha's mamluks. Barquq was made atabeg al-asakir in 1378, giving him command of the Mamluk army, which he used to oust Baraka in 1380. Afterward, he brought to Egypt his father Anas and many of his kinsmen, possibly in an attempt to establish a power base outside of the Mamluk establishment. Ali died in May 1381 and was succeeded by his nine-year-old brother, al-Salih Hajji but power was in the hands of Barquq, al-Salih Hajji's regent; Barquq had tried to succeed Ali as sultan, but his bid was vetoed by the other senior emirs. Nonetheless, the next year, Barquq toppled al-Salih Hajji with the backing of Yalbugha's mamluks and assumed the throne, adopting the title of Baybars, al-Malik az-Zahir.
Barquq's accession was enabled by the support of Yalbugha's mamluks, whose subsequent rise to power also made Barquq's position vulnerable. His rule was challenged in Syria in 1389 during a revolt by the Mamluk governor of Malatya, Mintash, and the governor of Aleppo, Yalbugha al-Nasiri, a former mamluk of both al-Nasir Hasan and Yalbugha al-Umari. The rebels took over Syria and headed for Egypt, prompting Barquq to abdicate in favor of al-Salih Hajji. The alliance between Yalbugha al-Nasiri and Mintash soon fell apart and factional fighting ensued in Cairo ending with Mintash ousting Yalbugha. Barquq was arrested and exiled to al-Karak where he rallied support for his return to power. In Cairo, Barquq's loyalists took over the citadel and arrested al-Salih Hajji. This paved the way for Barquq's usurpation of the sultanate once more in February 1390, firmly establishing the Burji regime. The ruling Mamluks of this period were generally of Circassian origin, drawn from the Christian population of the northern Caucasus. The name Burji, meaning 'of the tower', refers to the traditional residence of these mamluks in the barracks of the Citadel of Cairo.
Barquq solidified his power in 1393, when his forces killed the major opponent to his rule, Mintash, in Syria. Barquq oversaw the mass recruitment of Circassians (estimated at 5,000 recruits) into the mamluk ranks and the restoration of the Mamluk state's authority throughout its realm in the tradition of the early Mamluk sultans, Baybars and Qalawun. A major innovation to this system by Barquq was the division of Egypt into three niyabat (sing. niyaba; provinces) similar to the administrative divisions in Syria. The new Egyptian niyabat were Alexandria, Damanhur and Asyut. Barquq instituted this change to better control the Egyptian countryside from the rising strength of the Bedouin tribes. To that end, Barquq dispatched the Berber Hawwara tribesmen of the Nile Delta to Upper Egypt to check the Arab Bedouins.
During Barquq's reign, in 1387, the Mamluks forced the Anatolian entity in Sivas to become a Mamluk vassal state. Towards the end of the 14th century, challengers to the Mamluks emerged in Anatolia, including the Ottoman dynasty who absorbed the territory of the Karamanids in central Anatolia and installed a vassal as the leader of the Dulkadirids in 1399, and the Turkic allies of Timur, the Aq Qoyonlu and Kara Qoyounlu tribes who entered southern and eastern Anatolia during the same period. Barquq clashed with Timur at the Euphrates in 1394 and Timur withdrew during that episode.
Barquq died in 1399 and was succeeded by his eleven-year-old son, al-Nasir Faraj, who was in Damascus at the time. In that same year, Timur invaded Syria, sacking Aleppo before proceeding to sack Damascus. The latter had been abandoned by Faraj and his late father's entourage, who left for Cairo. Timur ended his occupation of Syria in 1402 to pursue his war against the Ottomans in Anatolia, whom he deemed a more dangerous threat to his rule. Faraj held onto power during this turbulent period, which, in addition to Timur's devastating raids the rise of Turkic tribes in the Jazira, and attempts by Barquq's emirs to topple Faraj, also saw a famine in Egypt in 1403, a severe plague in 1405 and a Bedouin revolt that practically ended Mamluk control of Upper Egypt between 1401 and 1413. Thus, Mamluk authority throughout the sultanate was significantly eroded, while the capital Cairo experienced an economic crisis.
Faraj was toppled in 1412 by the Syria-based emirs, Tanam, Jakam, Nawruz and al-Mu'ayyad Shaykh, against whom Faraj had sent seven military expeditions during his reign. The emirs could not usurp the throne themselves, and had Caliph al-Musta'in (r. 1406–1413) installed as sultan; the caliph had the support of the non-Circassian mamluks and legitimacy with the local population. Six months later, Shakyh eased al-Musta'in out of power after neutralizing his main rival, Nawruz, and assumed the sultanate. Shaykh's main policy was restoring the state's authority within the empire, which experienced further plagues in 1415–1417 and 1420. Shaykh reestablished the state's fiscal administration to replenish the treasury by launching tax collection expeditions akin to raids throughout the empire to compensate the tax arrears under Faraj's reign. Shaykh also commissioned and led military expeditions against the Mamluks' enemies in Anatolia, reasserting the state's influence in that region.
Before Shaykh died in 1421, he attempted to offset the power of the Circassian mamluks by importing Turkish mamluks and installing a Turk as atabeg al-asakir in 1420 to serve as regent for his infant son Ahmad. However, following his death, a Circassian emir, Tatar, married Shaykh's widow, ousted the atabeg al-asakir and assumed power. Tatar died three months into his reign and was succeeded by Barsbay, another Circassian emir of Barquq, in 1422. Under Barsbay, the Mamluk Sultanate reached its greatest territorial extent and was militarily dominant throughout the region, but his legacy was mixed in the eyes of contemporary commentators who criticized his fiscal methods and economic policies.
Barsbay pursued an economic policy of establishing state monopolies over the lucrative trade with Europe, particularly regarding spices, to the chagrin of the civilian merchants of the sultanate. European merchants were forced to buy spices from state agents who set prices that maximized revenue rather than promoting market competition. This monopoly over the spice trade set a precedent for his successors, some of whom established state monopolies over other goods such as sugar and textiles. Moreover, Barsbay compelled Red Sea traders to offload their goods at the Mamluk-held Hejazi port of Jeddah rather than the Yemeni port of Aden in order to derive the most financial benefit from the Red Sea transit route to Europe. Barsbay's efforts at monopolization and trade protection were meant to offset the severe financial losses of the agricultural sector due to the frequent recurring plagues that took a heavy toll on the farmers. In the long term, the monopoly over the spice trade had a negative effect on Egyptian commerce and became a motivation for European merchants to seek alternative routes to the east around Africa and across the Atlantic.
Barsbay also undertook efforts to better protect the caravan routes to the Hejaz from Bedouin raids and the Egyptian Mediterranean coast from Catalan and Genoese piracy. With regards to European pirates, he launched campaigns against Cyprus in 1425–1426, during which the island's Lusignan king, Janus, was taken captive, because of his alleged assistance to the pirates; the large ransoms paid to the Mamluks by the Cypriots allowed them to mint new gold coinage for the first time since the 14th century. Janus was forced to become Barsbay's vassal, an arrangement that was also enforced on his successors for several decades after.
After the victories in Cyprus, Barsbay became concerned with growing Timurid influence over the Hejaz and its holy sites. On several occasions, Shah Rukh, Timur's son and successor, seized the privilege of providing the Kiswa (mantle) that was draped over the Kaaba shrine in Mecca every year, a prerogative of the Mamluk sultan since the time of Baybars. Barsbay challenged this in 1434, convening the four senior qadis of Cairo to discuss Shah Rukh's presumption. The Hanafi judge sided against Shah Rukh and the other three refrained from issuing judgements, which Barsbay took as a validation of the Mamluk position. He reasserted Cairo's prerogative to send to Kiswa, though an exchange of letters on the matter with Shah Rukh grew increasingly antagonistic. During his reign he reduced the independence of the Sharifs of Mecca to a minimum, sent Mamluk troops to occupy the Hejaz and to rein in local tribes, and took direct control of most of the region's administration.
Barsbay launched military expeditions against the Aq Qoyonlu in 1429 and 1433. In the first expedition Edessa was sacked and its Muslim inhabitants massacred in retaliation for the Aq Qoyonlu's raids against the Mamluks' Jaziran territories. The second expedition was against the Aq Qoyonlu capital of Amid, which ended with the Aq Qoyonlu recognizing Mamluk suzerainty. Barsbay may have also feared an alliance between Shah Rukh, the Ottomans, and other regional states in the area. Janibak al-Sufi, a Mamluk who had originally opposed Barsbay's rise to power and had fled to Anatolia, was also a serious threat in this regard and rekindled concerns over unrest to the north. Barsbay sent an expedition that defeated Janibak near Ayntab (present-day Gaziantep) in July 1436 and advanced as far as Erzincan. Janibak escaped, but was eventually deemed a liability by his allies and died a prisoner in 1437, ending any further threats to Barsbay from the north.
While the Mamluks succeeded in forcing the Anatolian beyliks to largely submit to their suzerainty, Mamluk authority in Upper Egypt was mostly relegated to the emirs of the Hawwara tribe. The latter had grown wealthy from their burgeoning trade with central Africa and achieved a degree of local popularity due to their piety, education and generally benign treatment of the inhabitants.
Barsbay died on 7 June 1438 after suffering from the plague over several months. Per his wishes, his fourteen-year-old son, Yusuf, was officially installed as his successor that same day and one of his senior emirs, Sayf ad-Din Jaqmaq, was appointed his regent. The usual disputes over succession ensued and after three months Jaqmaq won and became sultan, exiling Yusuf to Alexandria.
Jaqmaq was a mamluk recruited by Barquq and was already 65 years old when he came to power. He had survived the preceding period by avoiding conflict and making few enemies, an attitude that continued into his reign. He maintained friendly relations with the Ottomans and, departing from Barsbay's forceful approach, allowed Shah Rukh to dispatch the mahmal (ceremonial litter) on the pilgrimage caravan to Mecca in 1444. His most important foreign military effort was an unsuccessful campaign to conquer Rhodes from the Knights of St. John, involving three expeditions between 1440 and 1444.
Domestically, Jaqmaq largely continued Barsbay's monopolies, though he promised to enact reforms and formally rescinded some tariffs. He continued to extort for financial gain but made a show of his piety and sought to frame all his actions within the mechanisms of Islamic law. When he died on 13 February 1453, he was well-respected by much of the population and was publicly mourned. Afterward, Jaqmaq's eighteen-year-old son, al-Mansur Uthman, was installed on the throne but soon lost all support when he tried to buy the loyalty of other mamluks with debased coins.
Sayf ad-Din Inal, who Barsbay had made his atabeg al-asakir in 1446, eventually won enough support to be declared sultan two months after Jaqmaq's death. Inal came to power at the age of 73. He was the last Mamluk sultan who began his career as a mamluk of Barquq and, unlike many predecessors, he had distinguished himself under previous sultans without ever being arrested.
Inal was sultan when Mehmed II, the Ottoman sultan, conquered Constantinople in 1453. An Ottoman embassy arrived in Cairo on 27 October 1453 to bring the news, after which Inal ordered lavish public celebrations to commemorate the event, much like the celebrations of a Mamluk victory. It is unclear whether Inal and the other mamluks understood the implications of this event, though they likely received the news with mixed feelings. This marked the rise of the Ottomans as a superpower, a status that brought them into increasing conflict with the Mamluk Sultanate, which grew more stagnant.
In Cyprus, Inal became embroiled in a succession dispute within the Lusignan dynasty on the island, still vassals of the Mamluks. John II, the son and successor of Janus, died in 1458 and the succession was disputed between his legitimate daughter, Charlotte, and his illegitimate son, James. The latter arrived in Cairo in May 1459 to request Inal's aid. The sultan agreed and began preparations for an expedition to the island to enforce his claim, but in March 1460 an embassy from Charlotte arrived and bribed Inal and his emirs into endorsing her claim instead. When James learned of this seeming betrayal, his supporters convinced Inal's emirs to reverse to their original position with an even larger bribe. Inal was finally convinced to reaffirm the claim of James. A military expedition was sent to the island, defeated Charlotte, and installed James as king.
Inal's behaviour during this episode was noted by contemporary observers as evidence of his unsteady policies. His willingness to accept the highest bribe reflected the state's severe financial difficulties. The ruling class tried to raise funds by selling offices and judge positions to individuals willing to buy them. The state's iqta properties were also sold off in return for military service, depriving the treasury of the tax revenues collected on these lands. Coins based on precious metals nearly disappeared from circulation.
Inal died on 26 February 1461. His son, al-Mu'ayyad Ahmad, was promptly installed as his successor and then promptly challenged by Janam al-Ashrafi, the governor of Damascus, and Janibak al-Zahiri, the governor of Jeddah. Eventually the Mamluks settled on a compromise candidate, Khushqadam al-Mu'ayyadi. Ahmad was exiled to Alexandria. Khushqadam was initially considered a temporary choice because he was not a Circassian (he was a possibly of Greek origin) but he outplayed his rivals. Janam was bribed at first and then alienated. He fled and sought help from Uzun Hasan, the Aq-Qoyunlu ruler, but died on a campaign near Edessa in 1462, before he could cause further trouble. Janibak was assassinated in August 1463.
Khushqadam's reign was marked by further political difficulties abroad and domestically. Cyprus remained a vassal, but Khushqadam's representative was killed in battle after insulting James II (who had been installed by Inal). In the Dulkadirid principality to the north, a succession dispute saw a Mamluk-backed candidate defeated by Shah Suwar, the candidate supported by the Ottomans. Closer to home, Bedouin Arab tribes were restless and the sultan had to send his forces against the Labid tribe in the Nile Delta region and against the Hawwara in Upper Egypt, with little effect.
Khushqadam died on 9 October 1467 and the mamluk emirs initially installed Yalbay al-Mu'ayyadi as his successor. After two months he was replaced by Timurbugha al-Zahiri. Timurbugha was deposed in turn on 31 January 1468, but voluntarily consented to the accession of his second in command, Qaytbay. Qaytbay was a Circassian purchased in 1435 or 1436 by a slave merchant, then recruited by Barsbay's agents in Cairo, and manumitted by Jaqmaq. Under Inal and Khushqadam, he rose through the ranks. Timurbugha, during his brief rule, appointed him as his atabeg. After he was installed as sultan, Qaytbay granted Timurbugha's request to retire peacefully in Damietta. Qaytbay's 28-year-long reign, the second longest in Mamluk history after al-Nasir Muhammad, was marked by relative stability and prosperity. Historical sources present a sultan whose character was markedly different from other Mamluk rulers. Notably, he disliked engaging in conspiracy, even though this had been a hallmark of Mamluk politics. He had a reputation for being even-handed and treating his colleagues and subordinates fairly, examplified by his magnanimous treatment of the deposed Timurbugha. These traits seem to have kept internal tensions and conspiracies at bay throughout his reign. While the Mamluk practices of confiscation, extortion, and bribery continued in fiscal matters, under Qaytbay they were practiced in a more systematic way that allowed individuals and institutions to function within a more predictable environment. His engagement with the civil bureaucracy and the ulema (Islamic jurists and scholars) appeared to reflect a genuine commitment to Sunni Islamic law. He was one of the most prolific Mamluk patrons of architecture, second only to al-Nasir Muhammad, and his patronage of religious and civic buildings extended to the provinces beyond Cairo. Nonetheless, Qaytbay operated in an environment of recurring plague epidemics that underpinned a general population decline. Agriculture suffered, the treasury was often stretched thin, and by the end of his reign the economy was still weak.
The challenges to Mamluk dominance abroad were also mounting, particularly to the north. Shah Suwar, the leader of the Dulkadirid principality in Anatolia, benefited from Ottoman support and was an excellent military tactician. Meanwhile, Qaytbay supported the ruler of the Karamanid principality, Ahmad. Initially, the Mamluks failed in a series of campaigns against Shah Suwar. The tide turned in 1470–1471 when an agreement was reached between Qaytbay and Mehmed II, by which Qaytbay stopped supporting the Karamanids and the Ottomans stopped supporting the Dulkadirids. Now without Ottoman support, Shah Suwar was defeated in 1471 by a Mamluk expedition led by Qaytbay's senior field commander, Yashbak min Mahdi. Shah Suwar held out in his fortress near Zamantı, before agreeing to surrender himself if his life was spared and he was allowed to remain as a vassal. In the end, Qaytbay was unwilling to let him live and Shah Suwar was betrayed, brought to Cairo, and executed. Shah Budaq was installed as his replacement and as a Mamluk vassal, though the Ottoman-Mamluk rivalry over the Dulkadirid throne continued.
The next challenge to Qaytbay was the rise of the Aq Qoyunlu leader Uzun Hasan. The latter led an expedition into Mamluk territory around Aleppo in 1472, but was routed by Yashbak. The next year, Uzun Hassan was more resoundingly defeated in battle against Mehmed II near Erzurum. His son and successor, Ya'qub, resorted to inviting Yashbak min Mahdi to participate in a campaign against Edessa. As this avoided any challenge against Qaytbay's authority, Yashbak accepted. Although initially successful, he was killed during the siege of the city, thus depriving Qaytbay of his most important field commander.
In 1489, the Republic of Venice annexed Cyprus. The Venetians promised Qaytbay their occupation would benefit him as well, as their large fleet than could better keep the peace in the eastern Mediterranean than the Cypriots. Venice also agreed to continue the Cypriots' yearly tribute of 8,000 ducats to Cairo. A treaty signed between the two powers in 1490 formalized this arrangement. It was a sign that the Mamluks were now depending partly on the Venetians for naval security.
With the death of Mehmed II in 1481 and the accession of his son, Bayezid II, to the Ottoman throne, Ottoman-Mamluk tensions escalated. Bayezid's claim to the throne was challenged by his brother, Jem. The latter fled into exile and Qaytbay granted him sanctuary in Cairo in September 1481. Qaytbay eventually allowed him to return to Anatolia to lead a new attempt against Bayezid. This venture failed and Jem was fled into exile again, this time into Christian hands to the west. Bayezid interpreted Qaytbay's welcome to Jem as direct support for the latter's cause and was furious. Qaytbay also supported the Dulkadirid leader, Ala al-Dawla (who had replaced Shah Budaq), against the Ottomans, but Ala al-Dawla was compelled to shift his loyalty to Bayezid c. 1483 or 1484, which soon triggered the start of an Ottoman–Mamluk war over the next six years.
In the spring of 1484, a combined Dulkadirid and Ottoman force captured Malatya. After further reverses, the Mamluk army ambushed and defeated the attackers near Malatya in September 1484. Qaytbay sent an envoy, Janibak Habib, to Istanbul to negotiate a peace in 1485, but to no avail. Over several years, Ottoman advances into Cilicia were met with Mamluk counterattacks that generally reversed their gains but failed to end the war decisively. In February 1486, the Mamluk commander, Azbak, scored a major victory. In response, Bayezid sent a larger force led by Hersekzade Ahmed Pasha, his father-in-law and the beylerbey of Anatolia, but the latter was defeated and captured by Azbak near Adana in March 1486.
In the spring of 1487, a new Ottoman campaign led by Grand Vizier Davud Pasha advanced into the region, reoccupying Adana. Qaytbay, realizing that the Ottomans could reconstitute a large army even after suffering major defeats, resolved to send a huge, well-armed expedition to force a more decisive outcome. The Mamluk army, led by Azbak, left Cairo in late May 1488. An Ottoman fleet attempted to land near a coastal fortress at Bab al-Malik but was repelled by Azbak. The decisive encounter occurred near Adana in August 1488, in the Battle of Aga-Cayiri. Over two days, both sides suffered heavy casualties, but the Ottomans lost many members of their chain of command and were eventually forced into a rout. Adana held out for three months longer, but Azbak returned triumphant to Cairo in February or March 1489.
In the aftermath of the battle, the Ottomans sent a peace overture which arrived in Cairo in May 1489, but Qaytbay rejected it. The Ottomans again sent another army that advanced into southeastern Anatolia in late 1489. Though the Mamluks struggled to finance their war efforts, Azbak led another expedition from Cairo in March 1490. The Ottomans refrained from attacking the Mamluks directly and Azbak pursued them into central Anatolia, with confrontations occurring near Kayseri. The Mamluks pillaged the region until October 1490, when Azbak, pressured by his troops and fearing a possible Ottoman trap, opted to turn back—a decision that soured his relationship with Qaytbay. By 1491, both sides were exhausted and an Ottoman embassy arrived in Cairo in the spring. An agreement was concluded and the status quo ante bellum was reaffirmed. During the rest of Qaytbay's reign, no further external conflicts took place.
Qaytbay's death on 8 August 1496 inaugurated several years of instability. His son, Muhammad, succeeded him but was assassinated on 31 October 1498. He was succeeded by his maternal uncle, al-Zahir Qansuh, who was driven out by al-Adil Tuman Bay in June 1500. Tuman Bay initially accepted Janbalat as sultan instead, but later proclaimed himself sultan while suppressing a revolt near Damascus and returned to force him out, taking power in January 1501. Three months later, he was deposed and replaced by Qansuh al-Ghuri (or al-Ghawri), his second in command. Al-Ghuri had stayed relatively uninvolved in Mamluk politics and initially refused to accept what he considered a dangerous position. He only agreed after multiple assurances were given and after Tuman Bay was executed.
Al-Ghuri secured his position over several months and appointed new figures to key posts. His nephew, Tuman Bay (not to be confused with al-Adil Tuman Bay) was appointed dawadar and his second in command. In Syria, al-Ghuri appointed Sibay, a former rival who opposed him in 1504–1505, as governor of Damascus in 1506. The latter remained a major figure during his reign but he acknowledged Cairo's suzerainty and helped to keep the peace.
Al-Ghuri is often viewed negatively by historical commentators, particularly Ibn Iyas, for his draconic fiscal policies. The sultan inherited a state beset by financial problems. In addition to the demographic and economic changes under his predecessors, changes in the organisation of the Mamluk military over time had also resulted in large numbers of soldiers feeling alienated and repeatedly threatening to revolt unless given extra payments, which drained the state's finances. To address the shortfalls, al-Ghuri resorted to heavy-handed and far-reaching taxation and extortion to refill the treasury, which elicited protests that were sometimes violent. He used the raised funds to repair fortresses throughout the region, to commission his own construction projects in Cairo, and to purchase a large number of new mamluks to fill his military ranks.
Al-Ghuri also attempted reforms of the Mamluk military. He recognized the impact of gunpowder technology used by the Ottomans and Europeans, but which the Mamluks had eschewed. In 1507, he established a foundry to produce cannons and created a new regiment trained to use them, known as the 'Fifth Corps' (al-Ṭabaqa al-Khamisa). The latter's ranks were filled recruits from outside the traditional mamluk system, including Turkmens, Persians, awlad al-nas, and craftsmen. The traditional mamluk army, however, regarded firearms with contempt and vigorously resisted their incorporation into Mamluk warfare, which prevented al-Ghuri from making effective use of them until the end of his reign.
In the meantime, Shah Ismail I had emerged in 1501 and forged the Safavid Empire in Iran. The Safavids styled themselves as champions of Twelver Shi'ism, in direct opposition to the Sunnism of the Mamluks and Ottomans. In 1508, Ismail captured Baghdad, threatening the eastern frontier of the Mamluk and Ottoman empires. In 1510, Safavid and Venetian envoys on their way to Iran were captured by the Mamluks near Aleppo, allegedly with evidence that the Safavids had proposed an anti-Mamluk alliance with Venice. This soured Venetian-Mamluk relations. Tensions were exacerbated when Rhodes attacked and destroyed a Turkish fleet carrying naval supplies and timber to the Mamluks. Al-Ghuri held the Venetians partly responsible and responded by impounding all Venetian goods in the Mamluk Sultanate. Eventually, the Venetians persuaded him to reopen trade in 1512 and resume normal relations. These events encouraged al-Ghuri to rely more on the Ottomans for aid, a policy that the Venetians ultimately also urged him to follow in order to counter their common foe, the Portuguese.
One of the major concerns of al-Ghuri's time was the Portuguese expansion into the Indian Ocean. In 1498, the Portuguese navigator Vasco da Gama circumnavigated Africa and reached India, thus opening a new route for European trade with the east which bypassed the Middle East. This posed a serious threat to Muslim commerce, which was dominant in the area, as well as to the prosperity of Venice, which relied on trade passing from the Indian Ocean to the Mediterranean through Mamluk lands. The Portuguese expeditions returning from India in the next few years drew enormous profits, while the Venetians saw their share of the goods from the east diminishing rapidly at the same time.
As resistance to their presence mounted, the Portuguese aimed to seize control of the Indian Ocean trade route by force. They occupied the island of Socotra in an attempt to control access to the Red Sea. The Venetians encouraged al-Ghuri to confront the Portuguese in defense of their mutual interests. The Mamluk sultan requested Venetian aid in building and supplying a fleet of ships in the Gulf of Suez. There is also evidence that the Ottomans began supplying the Mamluks with building materials for the construction and armament of a fleet from 1507 onward. A Mamluk fleet of fifty ships gathered at Jeddah in 1506 under the direction of the Mamluk governor there, Mir Hussein, and with assistance of forces from the Gujarat Sultanate, led by Malik Ayyaz. In 1507 they defeated the Portuguese, who were led by Francisco de Almeida and his son Lourenço, off the western coast of India. The Portuguese regained their dominance upon defeating a Mamluk and Gujarati fleet at the Battle of Diu in 1509.
The Portuguese, led by Afonso de Albuquerque, attacked Aden unsuccessfully in 1513, but then captured Hormuz in 1515. In the meantime, with Ottoman aid, the Mamluks were building a new fleet in the Gulf of Suez. In 1515, a joint Ottoman-Mamluk fleet, under the leadership of Salman Ra'is, finally left for the Red Sea and the Indian Ocean. Ultimately, it did not accomplish much. When the fleet returned to Egypt in 1517, they learned that Cairo had fallen to the Ottomans and Salman Ra'is allegedly threw his Mamluk co-commander overboard.
Selim I, the new Ottoman sultan, defeated the Safavids decisively at the Battle of Chaldiran in 1514. Soon after, he attacked and defeated the Dulkadirids, a Mamluk vassal, for refusing to aid him against the Safavids. Secure now against Ismail I, in 1516 he drew together a great army aiming at conquering Egypt, but to obscure the fact he presented the mobilisation of his army as being part of the war against Ismail I. The war started in 1516 which led to the later incorporation of Egypt and its dependencies in the Ottoman Empire, with Mamluk cavalry proving no match for the Ottoman artillery and the janissaries. On 24 August 1516, at the Battle of Marj Dabiq, the Ottomans were victorious against an army led by al-Ghuri himself. Khayr Bak, the governor of Aleppo, had secretly conspired with Selim and betrayed al-Ghuri, leaving with his troops part-way during the battle. In the subsequent chaos, al-Ghuri was killed. The surviving Mamluk forces returned to Aleppo but were denied entry to the city and marched back to Egypt, harassed along the way. Syria passed into Ottoman possession, and the Ottomans were welcomed in many places as deliverance from the Mamluks.
The Mamluk Sultanate survived a little longer until 1517. Tuman Bay, whom al-Ghuri had left as deputy in Cairo, was hastily and unanimously proclaimed sultan on 10 October 1516. The emirs rejected his plan to confront the next Ottoman advance at Gaza, so instead he prepared a final defense at al-Raydaniyya to the north of Cairo. In the early days of 1517, Tuman Bay received news that a Mamluk army was defeated at Gaza. The Ottoman attack at al-Raydaniyya overwhelmed the defenders on 22 January 1517 and reached Cairo. Over the following days, furious fighting continued between Mamluks, locals, and Ottomans, resulting in much damage to the city and three days of pillaging. Selim proclaimed an amnesty on 31 January, at which point many of the remaining Mamluks surrendered. Tuman Bay fled to Bahnasa in Middle Egypt with some of his remaining forces.
Selim initially offered the Mamluk sultan peace as an Ottoman vassal, but his messengers were intercepted and killed by mamluks. Tuman Bay, with 4,000 cavalry and some 8,000 infantry, confronted the Ottomans in a final bloody battle near Giza on 2 April 1517, where he was defeated and captured. Selim intended to spare him, but Khayr Bak and Janbirdi al-Ghazali, another former Mamluk commander, persuaded the Ottoman sultan that Tuman Bay was too dangerous to keep alive. Accordingly, the last Mamluk sultan was executed by hanging at Bab Zuwayla, one of Cairo's gates, on 13 April 1517. In reward for his betrayal at Marj Dabiq, Selim installed Khayr Bak as Ottoman governor of Egypt. Janbirdi was appointed governor of Damascus.
While the Mamluk Sultanate ceased to exist with the Ottoman conquest and the recruitment of Royal Mamluks ended, the mamluks as a military-social class continued to exist. They constituted a "self-perpetuating, largely Turkish-speaking warrior class" that continued to influence politics under Ottoman rule. They existed as military units in parallel with the more strictly Ottoman regiments like the janissaries and the azabs. The difference between these Ottoman regiments and the Egyptian mamluk regiments became blurred over time as intermarriage became common, resulting in a more mixed social class.
During this period, a number of mamluk 'households' formed, with a complex composition including both true mamluks and awlad al-nas, who could also rise to high ranks. Each household was headed by an ustadh, who could be an Ottoman officer or a local civilian. Their patronage extended to include retainers recruited from other Ottoman provinces as well as allies among the local urban population and tribes. Up to the early 17th century, the vast majority of Egyptian mamluks were still of Caucasian or Circassian origin. In the later 17th and 18th centuries, mamluks from other parts of the Ottoman Empire or its frontiers, such as Bosnia and Georgia, began to appear in Egypt.
Throughout the Ottoman period, powerful mamluk households and factions struggled for control of important political offices and of Egypt's revenues. Between 1688 and 1755, mamluk beys, allied with Bedouin and factions within the Ottoman garrison, deposed at least thirty-four governors. The mamluks remained a dominating force in Egyptian politics until their final elimination at the hands of Muhammad Ali in 1811.