# David IV

David IV, also known as David IV the Builder (Georgian: დავით IV აღმაშენებელი, romanized: davit IV aghmashenebeli) (c. 1073 – 24 January 1125), of the Bagrationi dynasty, was the 5th king (mepe) of the Kingdom of Georgia from 1089 until his death in 1125.
Popularly considered to be the greatest and most successful Georgian ruler in history and an original architect of the Georgian Golden Age, he succeeded in driving the Seljuk Turks out of the country, winning the Battle of Didgori in 1121. His reforms of the army and administration enabled him to reunite the country and bring most of the lands of the Caucasus under Georgia's control. A friend of the Church and a notable promoter of Christian culture, he was canonized by the Georgian Orthodox Church.

## Sobriquet and regnal ordinal

The epithet aghmashenebeli (აღმაშენებელი), which is translated as 'the Builder' (in the sense of "built completely"), 'the Rebuilder', or 'the Restorer', first appears as the sobriquet of David in the charter issued in the name of "King of Kings Bagrat" in 1452 and becomes firmly affixed to him in the works of the 17th- and 18th-century historians such as Parsadan Gorgijanidze, Beri Egnatashvili and Prince Vakhushti. Epigraphic data also provide evidence for the early use of David's other epithet, the Great (დიდი, didi).
Retrospectively, David the Builder has been variously referred to as David II, III, and IV, reflecting substantial variation in the ordinals assigned to the Georgian Bagratids, especially in the early period of their history, as the numbering of successive rulers moves between the many branches of the family. Scholars in Georgia favor David IV, his namesake predecessors being: David I Kouropalates (died 881), David II Magistros (died 937), and David III Kuropalates (died 1001), all members of the principal line of the Bagrationi dynasty.

## Early life and accession to the throne

David was born in 1073 and was the son of King George II of Georgia and his wife, Queen Elene. He was probably educated by George of Chqondidi, a member of the royal court. David grew up in a time of war and desolation, due to the ravages of the Seljuks and his father's many defeats against these invaders. In such a situation, a major opposition to George II arose, which led to a power change in favour of the young David; George of Chqondidi would have been one of these opponents.
The Life of King of Kings David does not recount the details of the change of power between George II and his son. Nodar Asatiani describes the event as a ‘palace revolution’ involving several dignitaries in 1089. Other historians speak of pressure on the Georgian king to abdicate rather than a coup d'état. David IV's contemporary chronicler limits himself to mentioning the change of power as a coronation of the young prince by his father, which pushes certain historians such as Cyril Toumanoff to suggest a co-regency between George II and David IV, at least until 1112, while frescoes found in the Ateni Sioni Church depict him in monk's robes, which would mean that his abdication was forced. The historical tradition founded by Prince Vakhushti in the 18th century and followed by Marie-Félicité Brosset in the 19th century states that David succeeded George upon his death, a number of surviving documents suggest that George died around 1112, and that although he retained the royal title until his death, he played no significant political role, real power having passed on to David. Moreover, David himself had been a co-ruler with his father sometime before his becoming a king-regant in 1089; a document of 1085 mentions David as "king and sebastos", the latter being a Byzantine title.
The accession of David IV was welcomed by several factions in the country as a sign of liberation for the Kingdom of Georgia, which was suffering politically, economically, culturally and even religiously. Expressions such as ‘a coronation from God’ appear in contemporary accounts. The Georgian Chronicles describe:
   Then the breath of life began to blow and the clouds appeared to ascend; and after twelve years of such miseries in the very midst of pitchdarkness, the sun of all the kingdoms began to rise, and the namesake of David, father of the Lord, great be his name and still greater his deeds, appeared, the seventy second descendant of David.

## Revival of the Kingdom

Having become king at the age of 16, the young David IV found himself at the head of a kingdom that had lost a large part of its 1010 territories. The kingdom of Georgia, which at the beginning of the 11th century had extended from Shirvan to the east coast of the Black Sea, was now limited to Abkhazia and Kartli. The ravages caused by Turkish raids since the 1080s represented an economic danger for the country, which was forced to recognise itself as a vassal of the Seljuks and pay tribute to the invaders. Internally, the foundations of the Georgian state, based on Orthodoxy and central royal power, were undermined, bringing a supposedly unified kingdom to the brink of destruction. Several historians compare the young sovereign's task to that of David III of Tao and Ivane Marushidze, the princes who unified the Georgian realm.

### The end of the Turkish ravages

The first step taken by David IV to re-establish the Georgian economy was to put an end to Turkish raids into Georgia. Since 1080 and the capture of Kutaisi by Amir Ahmed, the Kingdom of Georgia had been obliged to accept Seljuk suzerainty and pay annual tribute. Despite these measures, the Muslims did not stop their seasonal devastation and several nomadic Turkish tribes settled in Georgia at the expense of the Georgian population, causing the collapse of the local feudal system. Contemporary historiography reports that by the time of David the Builder, Inner Georgia no longer had a rural population, the inhabitants having all taken refuge in the local citadels.
To expel the Turkomans from his territories, King David began by reorganising an army whose morale was at its lowest due to its many defeats; he then formed several small military detachments made up of the lower nobility and peasants from the royal estates. Dozens of such detachments were soon created and a new strategy, consisting of surprise attacks on Muslim settlements, was devised. Within a short space of time, the monarch not only succeeded in stopping the Seljuk invasions, but also attacked the Turkoman nomads at the same time.
An armistice was soon established between the Georgians and the Turks. Under the terms of the treaty, David IV undertook to pay the tribute established during his father's reign in exchange for a total end to Seljuk raids. However, this did not stop some Turks, whose troops were massacred by Georgian units, while the Turcomans established in the countryside were gradually expelled from the country, allowing Georgians to return to their villages. Little by little, the social conditions of the local population improved, reviving the national economy and increasing the population.

#### Cessation of tribute to the Seljuks

The death of Malik-Shah I and the First Crusade, which forced the Seljuks to concentrate on saving Syria and Palestine and leaving the Caucasus alone, led David IV to stop paying tribute to the Seljuks in 1099 and to start repopulating the depopulated and devastated regions and rebuilding the cities and the army. This was a declaration of war, but the sultan of the Seljuk empire did not respond.

### David IV against the nobles

After putting an end to Turkish invasions and re-establishing the traditional feudal system, David IV decided to strengthen central power before embarking on more important projects. Just after the Georgian economy was restored, a large part of the nobility, including the duke Liparit V of Kldekari and Prince Niania Kakhaberisdze, pledged their allegiance to the king. This act represented a remarkable change compared to the reactions of noble society to previous kings, but was short-lived.
In 1093, Liparit V organised a plot against David. David was informed of this and reacted by imprisoning Liparit to make him a ‘wise man’, according to the Georgian Chronicles. Two years later, he was released on a pledge of loyalty and reinstated in his domains of Trialeti and Kldekari. However, the nobleman did not give up his plans against his suzerain and resumed plotting against David. Having once again learned of such an event, David IV decided to act more usefully and imprisoned him again until 1097, before exiling him to Constantinople, where he died. Liparit's son, Rati IV, a disloyal man, died in 1103, thus putting an end to a rebellious branch of the House of Liparitids and allowing the monarch to expand his domains.
Liparit was not the only nobleman to suffer the consequences of the king's plans. Several others, including Dzagan Abuletisdze, were severely punished in the same way after rebellions, and their estates added to the royal states. David took major initiatives to strengthen his power. He also dismissed the dignitaries chosen by his predecessors on the basis of their titles and replaced them with loyal advisors, generally from the lower nobility.

### Conquest of Kakheti-Hereti

Having reduced the power of the great rulers of the kingdom, King David IV decided to complete national unity. To achieve this, he had to reunite western Georgia with the rest of the country. The Kingdom of Kakheti-Hereti had declared its independence during the reign of George I (r. 1014-1027), thus depriving Georgia of a large part of its territories. Realising that only war could help him in his plans, the king launched a short attack against King Kvirike IV and succeeded in capturing the fortress of Zedazeni, north of Mtskheta, in 1103.
Kvirike IV died a year later and was succeeded on the throne by his nephew Aghsartan II, who is said to have been ‘the complete opposite of his paternal uncle’. A convert to Islam, he declared himself a vassal of the Seljuks to avoid another Georgian attack. However, he could not foresee the discontent of the nobility in his own kingdom, who were hardly satisfied by their sovereign's change of religion. In 1104, a conspiracy led by the Heretian nobles Arishiani, Baram and their uncle Kavtar Baramisdze dethroned Aghsartan II and handed him over to David IV, who then had no need to resort to arms, as every Kakhetian citadel and fortress capitulated to the approaching Georgian forces. Once the two new provinces had been integrated into the kingdom, the king appointed Arishiani governor of the region.
The Seljuks, who still considered the Kingdom of Kakheti-Hereti to be their vassal, were not resigned to another defeat by the Georgians. The Atabeg of Ganja declared war on Georgia and fought a decisive battle at the Battle of Ertsukhi. The Turko-Kakhetian army was annihilated by the Georgian troops, led personally by David IV, whose exploits are recounted in the Georgian Chronicles. His chronicler compares the bravery of David IV to the biblical David and reports the ferocity of his blows. Three of his horses died during the battle, but the king, mounted on his fourth horse, succeeded in drawing with his sword ‘a thickened and congealed mass of blood ’.

### Domestic reforms

Having re-established the unity of the Kingdom of Georgia, David IV began again to reform the internal kingdom. To this end, in 1103 (or in 1104 or 1105) he convened a council of the Catholicos-Patriarch of All Georgia in the cathedrals of Ruisi and Urbnisi. After decades of devastation and war, the Orthodox Church had lost its traditional values and was suffering from many ills, such as corruption and the hereditary transmission of high religious offices. Inspired by the ideas of the 11th-century monk George the Hagiorite, the king and his adviser George of Chqondidi aligned themselves with the demands of the majority of his subjects to overcome the reactionary part of the ecclesiastical class and replace dishonest subjects with virtuous priests. The Council of Ruisi-Urbnisi, led only indirectly by David IV who, as a lay sovereign, could not take part in the internal affairs of the Church, adopted resolutions reflecting the will of the pious party. Not only did the Council deprive the nobility fighting against central power of an influential ally, the Church, but it also spiritually purified the kingdom and greatly contributed to the national consolidation of a country whose national identity was mainly based on Christianity.
Another consequence of ecclesiastical reform was the de facto subordination of the Church to the State. However, the king had to ensure this by taking other reforming steps. Thus, David IV decided to centre this plan around the function of a single man: the Mtsignobartukhutsesi. This latter position, equivalent to the dignity of chancellor, had existed for a long time in the Georgian royal court and had always been held by monks, to avoid a hereditary transfer of power. The reform of David IV thus combined the Mtsignobartukhutsesi with the bishopric of Chkondidi, the main religious entity in Georgia after the Catholicos-Patriarch, and created the new position of Mtsignobartukhutsesi-Chkondideli, i.e. the first person in the kingdom after the king and the first person in the Church after the Catholicos-Patriarch. George of Chkondidi, the monarch's political adviser, was thus confirmed in his position and his successors to the episcopal see were also appointed viziers at the royal court. Other officials reporting to the king were also appointed to head each branch of the administration. Thus, from the reign of David IV, there was a Mandaturtukhutsesi, or minister of the interior, an Amirspasalar, the head of the military administration, and a Mechurchletukhutsesi, the minister of finance and administrator of the kingdom's cities.
The king's reforms did not stop at the country's administrative system. At the same time, he set up the darbazi (High Council of State), which included the highest dignitaries of the Church, such as the Catholicos-Patriarch and the superiors of the major monasteries, and the Saadjo kari (literally, ‘Court of Petitions’), a kind of Supreme Court headed by the Mtsignobartukhutsesi-Chkondideli to ‘defend the oppressed and humiliated’ and where the king personally came to administer justice. Finally, the king's reforms ended with a change in the military establishment.
Under Kings Bagrat IV and George II, the general decline in the economy had been accompanied by a significant fall in the population and an increase in the arbitrariness of the great feudal lords, leading to a deterioration in the quality of the Georgian army by undermining the discipline of the troops. David IV, considering the future wars he would have to wage against the Muslims, therefore decided to use the military organisation of the Seljuk Turks as a basis for reforming his own army. David IV began by gathering together his most loyal warriors to form a personal guard, the monaspa, which depended entirely and directly on the king. In addition, the feudal militias were abolished, once again reinforcing central power. In addition to these measures, the king divided the army into two other fundamental parts: one consisting of garrisons charged with protecting towns and fortresses, and the other making up the basic army that ‘was constantly campaigning, both in winter and summer’. Troop discipline was also ensured through humiliation for cowardice and rewards for heroism. Moreover, as the economy recovered, the Georgian population grew and a larger-scale mobilisation by the royal authorities was now possible.

### Foreign policy
#### Negotiations with the North Caucasus

The foreign relations conducted by King David IV the Builder were exclusively devoted to the liberation of the Kingdom of Georgia and, in this way, remained focused on the Georgian–Seljuk wars. However, David IV soon realised that the Seljuk Empire remained a permanent threat to his kingdom until the security of the Caucasus against Muslim invaders was assured. To this end, the king drew up a plan to unite the Caucasian peoples under his sceptre. Assisted by his closest advisers, the Georgian sovereign began by establishing solid relations with the many tribes of North Caucasus and beyond the Great Caucasus.
Shortly after his 1107/1108 divorce from the Armenian princess Rusudan, David IV married the daughter of the Khan of the Kipchaks Otrok, who was soon baptised with the name Gurandukht. However, this alliance did not last and there was no sign of bilateral relations for the next decade. But soon, as Georgia began its new campaigns against the Seljuks, the king did not hesitate to call on his father-in-law for military aid. At the time, the Kipchaks were renowned in the region for their bravery, agility and ferocity in battle, but they were also caught up in a conflict on two fronts, one against the Kievan Rus' to the north and the other against the Alanians to the south. David therefore offered Prince Otrok assistance against these two enemies in exchange for Kipchak support against the Turks, and decided to visit the prince's estates.
Accompanied by his loyal adviser George of Chqondidi and his personal guard, David IV crossed the Great Caucasus via the Darial pass in 1118. After extensive negotiations, the Georgians managed to convince Otrok to give them several thousand Kipchak troops to fight against the Seljuks. But despite this agreement, the Kipchaks were unable to get to Georgia because of the war with the Alanians. To consolidate peace with the Alanians, David IV betrothed his youngest daughter Rusudan to Jadaron, son of the Alanian king Athon and heir to the Alanian throne. Taking both Alanians and Kipchaks as hostages, he managed to negotiate a lasting peace between the two peoples and returned to the kingdom of Georgia with almost 40,000 Kipchak families (almost 200,000 individuals), led be Otrok himself, after recovering and securing the fortresses of the Great Caucasus, but leaving behind George of Chqondidi, who died during the negotiations in Alania.
The many Kipchak families settled in colonial establishments in Shida Kartli, where a large part of the Georgian population had been exterminated by the Seljuks in the 1080s, but also in Hereti and in the north of Georgian Armenia, with the aim of reinforcing the borders. They were also accompanied by Alanian, avaricious and Kurdish mercenaries. They soon adopted Christianity, learned the Georgian language, changed their nomadic habits and became sedentary, gradually mixing with the Georgians. The central government then asked each family to provide at least one soldier for the Georgian army. However, the Kipchaks, who were hardly accustomed to a sedentary life and loyal to a single person, found themselves in a new landscape that they took to be hostile. Thus, until his death, David IV survived several assassination attempts and coups d'état organised by certain Kipchak groups. But this did little to change the situation of the new arrivals and, thanks to these negotiations, the reform of the army was completed and Georgian troops now number almost 60,000.
In addition to this alliance between the Kipchaks and Georgia, David IV the Builder established deeper relations with the other peoples of the North Caucasus. He created a sphere of cultural influence in North Caucasus, established Orthodoxy there by sponsoring the building of Georgian churches among the local peoples, and developed the economies of these peoples by helping to found urban communities and introduce the Georgian feudal system to the region. Georgian culture also became an integral part of local organised societies, with Georgian social terminology being introduced. Politically, David IV decided to strengthen the influence of his kingdom in the North Caucasus by making the regional sovereigns his vassals and controlling the routes leading from South Caucasus to North Caucasus via the Great Caucasus mountain range. He fortified the Djvari and Darial crossings and set up Georgian trading posts on the road to Derbent, whose sovereign swore allegiance to the King of Georgia.

#### Relations with the Byzantine Empire

Since the creation of the Kingdom of Georgia and its beginnings as a regional power in the Caucasus under the reign of Bagrat III, the Byzantine Empire and Georgia have clashed on several occasions, both diplomatically and militarily, notably over the province of Tao-Klarjeti. In addition to several wars between the two countries, each of these states interfered in the internal affairs of the other by openly or secretly supporting candidates to the throne, usurpers or, in the case of the Byzantine strategy, rebellious nobles against the power of the king.
Despite several peace proposals over the years, it was not until the Battle of Manzikert between the Byzantines and the Seljuks that Byzanitne and the Kingdom of Georgia allied themselves against the Turkish Muslims. However, this alliance had little political impact due to the considerable weakening of the Byzantine Empire in the face of the Seljuks, to whom Georgia had to submit. However, the liberation of the Caucasus from Turkish suzerainty in the 1090s changed events and led David IV to adopt a new policy towards Byzantium. This involved a combination of closer cooperation, while at the same time putting itself on the same political footing as the Empire and opposing the Byzantines on certain issues.
Bilateral relations were resumed with the agreement between Byzantium and David IV, according to which the noble rebels against the Georgian king were sent to prison in Greece. At the same time, David definitively renounced Byzantium's political influence in Georgia by renouncing the Byzantine title of Panhypersebastos, a title created by Emperor Alexios I Komnenos for the closest allies of the imperial family. Finally, from the reign of David the Builder, Byzantium and Georgia clashed spiritually, with King David assuming the title of ‘ruler of East and West’, thus claiming to have a greater influence than Byzantium in Orthodoxy.
Despite these signs, relations between Byzantium and Georgia also reached good levels. The marriage of David IV's daughter, Kata, to an imperial prince in 1116 is particularly notable. Some Georgian historians also note the help provided by Georgian agents accompanying Princess Kata's retinue in the seizure of power by John II Komnenos in 1118. As a result, from the beginning of John II's reign, relations between the two countries improved considerably and the Georgian chronicles refer to the two monarchs as ‘brothers’. And, despite the competition in the religious sphere, the Byzantines and Georgians cooperated culturally for a certain period and we can thus see religious buildings constructed through bilateral efforts, such as the major renovation of the Mokvi Cathedral.

## Military campaigns
### The reconquest of lost territories

David IV the Builder considered the security of the Caucasus and, therefore, the liberation of the region from the Seljuks to be the main goal of his reign. It was for this reason that, well before the start of the main negotiations with the Kipchaks, he already began to fight against the Turkish presence in Caucasus in 1110. Up until that year, the Turks had occupied the towns of Tbilisi and Rustavi, the regions of Samshvilde and Agarani and Armenia, where hundreds of Muslim settlers arrived every year during the harvest period. The Georgians, led by George of Chqondidi, his nephew Theodore, governor of Trialeti, Abuleti and Ivane I Orbeli, retaliated against the Turkish settlement and recaptured the town of Samshvilde without a major battle, adding it to the royal domains. Following this capture, the Seljuks left a large part of their occupied territories, allowing Georgian troops to capture Dzerna [ka].
In response to this double defeat, Sultan Muhammad I Tapar sent a large army of 100,000 soldiers to invade Georgia in 1110. Knowing that the Turkish troops were approaching, David IV left his residence at Nacharmagevi with a personal guard of just 1,500 and set out to meet the invaders during the night. The two armies, clearly unequal, clashed the next day at the Battle of Trialeti in a fierce battle that ended in a decisive victory for Georgia. The Georgian Chronicles recount that, not believing in such a simple victory, the king stayed on until the following day, waiting for another Seljuk retaliation, and only then realised the Seljuk defeat.
The situation developed only slightly over the next five years. But in 1115, George of Chqondidi, who commanded the Georgian forces while David IV was in Mukhrani, captured Rustavi, one of the strong Turkish strongholds in southern Georgia. The Turks were then forced to leave their winter quarters, while the king personally took charge of detachments organising seasonal expeditions against the Muslim occupiers. In February 1116, David IV managed to trap the Seljuks, inflicting considerable losses on them on the Chorokhi and capturing Tao-Klarjeti and the many riches left there by the Turks.
The conflict soon took on a regional dimension with the opening of a new front in Eastern South Caucasus. In 1117, the Georgians led by Crown Prince Demetrius invaded Shirvan after capturing the fortress of Gishi, which had been in the hands of rebellious nobles. Demetrius fought ‘marvellous battles’ in the region and captured the fortress of Kaladzori, before returning home with many captives and much wealth.
The Georgian army's first notable defeat came in 1118, when General Beshken II Jaqeli [ka] was killed by the Turks in Javakheti. Despite this loss, however, David IV refused to listen to his nobles' advice to retreat and managed to avenge Beshken's death by defeating the Seljuks at the Battle of Rakhsi and massacred the Seljuk garrisons on Araxes in April 1118.
The reforming sovereign's successes did not stop there. Still in 1118, the Armenian towns of Lori and Agarak were captured by David IV, marking the beginning of the conquest of Armenia by medieval Georgia, while the Agarani region was recaptured in July of the same year, after just one day of fighting. It was after this victory at Agarani that David IV and George of Chqondidi travelled to North Caucasus, realising that despite the encouraging signs of a total defeat for the Seljuk forces, the Georgian army would have to be considerably strengthened to achieve this goal. The royal administration, now headed by Simon of Chqondidi since the death of George, devoted the year 1119 exclusively to establishing a new strategy against the Turks, while establishing Kipchak mercenaries on Georgian territory, before launching a new offensive at the beginning of 1120.

### Battles to drive out the Turks

King David IV used to go to Abkhazia and the Turks wintered near the banks of the Mtkvari. The Turks had been watching David IV and were following his tracks. David IV went to Geguti and from there to Khupati and thus gave the Turks the confidence to return. Learning that he was away, they camped at Botora. The Turks were many and they set up camps to spend the winter. On February 14, David IV suddenly attacked the Turks and completely destroyed them at the Battle of Botora. Only a few of them managed to get on their horses and flee. In the battle the Georgians captured many Turks and took much booty.
Only two months later, David IV again led his troops to intervene in Shirvan: after capturing the city of Qabala and returning to Georgia with large loads of gold, he returned to the region on May 7, 1120 and ravaged the country from Arbia-lizhatat to Khishtalanti and Kurdevan. At the same time, David IV managed to convince his vassal of Derbent to invade Shirvan and a war between the two parties soon broke out. In November, the Derbentians killed Shirvanshah Afridun I in combat, giving the king of Georgia the opportunity to place his own son-in-law and vassal, Manuchihr III, in Shirvan. At the same time, David the Builder led short but effective campaigns in the southeast and notably took the Turkish bastions of Arsharunik and Sevgelamej.
Taking advantage of the climatic conditions which had until then worked against them, the Turks in turn organized a large-scale offensive against Georgia in winter 1120–21. Indeed, at that time, David IV resided in Abkhazia in his winter home and the Turkish strategy therefore lay in a rapid invasion of central and eastern Georgia. Soon, Seljuk forces occupied much of Kartli, as far as the Greater Caucasus. However, King David, having learned of the situation in the rest of his kingdom, rushed out of Abkhazia and ordered his soldiers to dig a passage through Likhi Range, then impassable and thus separating eastern Georgia from its part Western. The Georgian troops attacked Khunan and engaged in bloody combat until the spring, and all the Turkish forces were expelled or massacred in March 1121.
But the Seljuks did not stop there. Knowing that the flooding of the Mtkvari made crossing the river almost impossible at this time of year, the Seljuks soon returned to their positions south of the river and occupied Barda. But once again, David IV, accompanied by a personal guard of Kipchaks, crossed the river towards Khunan and organized military incursions against the Turks stationed at Barda and Arabia in June. The Muslims, according to Georgian historiography, were then “reduced to the brink” by a long series of costly defeats for more than ten years.

#### Battle of Didgori

Shortly after the double defeat of Barda and Arabia, the Turkish settlers of South Caucasus and the Muslim merchants of Ganja, Tbilisi and Dmanisi sent representatives to the Seljuk Sultan of Iraq Mahmud II (r. 1118–1131), formally requesting military support against the Georgian forces. The Muslim monarch, fed up with the victories won by an increasingly powerful Christian kingdom while the Crusaders already found themselves powerful enemies of the Turks in the west, then declared jihad (holy war of Islam) against Georgia and unifies a large Turkish army with detachments formed by the Seljuks of Turks coming from all over the Middle East (from Damascus and Aleppo to Caucasus) with: Tughril a Seljuk cadet who governs Azerbaijan and Arran from Nakhchivan, Arab forces of the Mazyadid emir Dubays ibn Sadaka, troops led by Najm ad-Din Ilghazi ibn Artuq from Aleppo, and garrisons from Ganja and Armenia, with the aim of invade the Kingdom of Georgia. Mahmud II also appointed General Ilghazi, famous for his battles against the Europeans in the Holy Land and having concluded a temporary truce with the crusading Latins, as commander of these massive Muslim troops, whose numbers rose, d 'according to the sources, from 200,000 to 400,000 or even 600,000 soldiers.
Having learned of the declaration of jihad by Mahmud II, David IV understood that the defeat of such an army would lead to the total liberation of the Caucasus and, therefore, the completion of the political goal of the Georgian ruler. In turn, he assembled a large army, composed of 40,000 Georgians, 15,000 Kipchaks and 5,000 Alans (60,000 troops in total), to which was added a detachment of 200 to 1,000 Crusaders from Western Europe. The king decided to let the Turks penetrate into Georgia proper, with the idea of benefiting from the local geography, and finally intercepted the enemy on the roads linking Trialeti to interior Kartli. The two armies met near the town of Manglisi, at the foot of Mount Didgori, on August 12, 1121.
According to the French knight and historian Walter the Chancellor, before heading off to battle, King David inspired his army with these words:
   Soldiers of Christ! If we fight bravely for our Faith, we will defeat not only the devil’s servants, but the devil himself. We will gain the greatest weapon of spiritual warfare when we make a covenant with the Almighty God and vow that we would rather die for His love than escape from the enemy. And if any one of us should wish to retreat, let us take branches and block the entrance to the gorge to prevent this. When the enemy approaches, let us attack fiercely!
The king personally launches the attack, rushing his troops towards the attackers with a ferocity comparable to that of a "rambling monster". From the first attack, the Muslims were forced to retreat despite their numerical superiority, allowing the Georgians to multiply such attacks. Soon, these maneuvers bring the enemy to such a degree of excitement and disorientation that they make him lose composure. At this moment, David IV launched a new attack, which turned into a coup de grace for the Muslim allies on the battlefield: suddenly, the vigor of the enemy army collapsed in the middle of the fight. The genius of Georgian strategy then defeated the power of numbers, bringing a decisive defeat to the Seljuk Empire and its influence in the Caucasus. Testimonies report in various chronicles, both Christian and Muslim, that Saint George personally led the Georgian forces against the invader. Among the many commanders of the invading troops, only General Ilghazi and his son-in-law Dubays managed to escape. This victory at the Battle of Didgori had an important repercussion on the fate of the Crusades, whose leaders were then seeking crucial aid against the Turks, and stories, sometimes exaggerated, of Didgori's victory were told in the royal courts of the West as a new hope against Muslim power.

### Relations with the Middle East

Besides Europe, David IV established relations with the Middle East. This is how he maintained close relations with the Crusader forces, and in particular with King Baldwin I of Jerusalem (r. 1100–1118), with whom he exchanged numerous gifts as a sign of support. In addition, as stated above, a battalion of Latins composed of 200 to 1,000 men participated during the Battle of Didgori. Some sources also speak of the participation of Georgian auxiliary forces during the Siege of Jerusalem in 1099. The historian Prince Ioane of Georgia even reports a secret visit by King Baldwin II of Jerusalem to the Georgian royal court. The existence of a powerful Kingdom of Georgia is also felt in the Arab world, where the Georgian monarch's kindness to his Muslim subjects and his knowledge of the Quran are renowned. A coin with the Arabic inscription “King of Kings David, the Sword of the Messiah” then circulated throughout the Middle East.

## Last years
### Liberation of Tbilisi

The defeat of the Seljuk Empire at the Battle of Didgori in August 1121 allowed David IV to liberate the Caucasus from Muslim domination dating back several centuries. Georgia's enemies found themselves decisively defeated, preventing them from retaliating against the northern Christian advance, while the Crusades raged in the west of the Turkic world. However, there remains a last Islamic enclave within the Georgian kingdom, an enclave having lost all relations with other Muslim states since the start of King David's conquests. This corresponds to the Emirate of Tbilisi, which had been occupied by the Arabs for almost five centuries, and contains the regions of Tbilisi and Dmanisi.
Already in June 1121, David IV had put the city of Tbilisi under siege but was content with a formal allegiance with an annual tribute, in view of the upcoming war against the Turkish invaders. Once the Seljuks were defeated, the sovereign focused on the capture of Tbilisi from the beginning of 1122. After a short siege, the king, probably accompanied by general Ivane Orbeli, managed to take the city in February and enters it to rid it of the Muslim elite. According to Arab historiography, David IV carried out a pillage on the first day of the conquest, devastating the mosques and other signs of the Islamization of the Georgian city, but soon calmed down. and, in the words of the 15th-century Arab historian Badr al-Din al-Ayni, "respected the feelings of Muslims more than Muslim rulers had done before."
Following the capture of the city, the king transferred the capital from Kutaisi to Tbilisi, thus restoring the latter to the status it had before the Arab conquest of the 7th century. The recovery of Tbilisi guarantees a cultural renewal in the city, whose Christian religious buildings are being enlarged. David the Builder also built several noble palaces and cultural centers, such as an important palace built especially to serve as a place of study and inspiration for Muslim poets. However, the situation in the city has not calmed down. During the following years, several bloody clashes between Muslims and Christians occurred, and even the royal power failed to calm inter-religious dissensions. At the same time, David IV decided to preserve some of the institutions of the former emirate of Tbilisi. Thus, the post of emir was retained, but as governor of the city, until the 18th century.
Despite this conquest, the Muslim enclave, whose territory was greatly reduced following the loss of its administrative center, persisted in the middle of the Georgian kingdom. David IV finally decides to put an end to the existence of this State, just after having “settled the affairs of the country”. In March 1124, he managed to attack the last Muslim stronghold in Georgia, Dmanisi, which he took after a short fight, thus completing the unification of Georgia.

### Conquest of Shirvan

The resumption of Tbilisi by David the Builder ebuilder therefore established the kingdom of Georgia as the supreme protector of Christianity in the Caucasus and the Georgians now tried to assert their domination by trying to reduce the Muslim presence in the same region, this one being considered an ally of the Seljuk Empire. This is the case with Shirvan, whose sovereign, already defeated several times by Georgian troops, remained too independent of Georgian power and was forcibly replaced by a son-in-law of David IV, Manuchihr III, in 1120. The Turks, alarmed by the situation in Caucasus, then decided to respond militarily.
Sultan Mahmud II soon resumed the war against Georgia, despite his defeat at the Battle of Didgori a year earlier. In November 1122, he began his invasion of Shirvan and captured Tabriz, before reaching the local capital, Shamakhi, the following spring. Mahmud then captured the regional sovereign Manuchihr III and sent a letter to the king of the Georgians saying: "You are the king of the forests, and you never go down to the plains. Now I have taken Shirvanshah and I demand Kharaj [tribute] from him. If you wish, send me suitable presents; if not, come and see me in all haste.
Following this provocation, the Christian monarch called in all his troops and assembled an army of 50,000 men, most of them Kipchaks. The Seljuk sultan locked himself in Shamakhi after learning of the arrival of the Georgian troops, prompting David IV to halt his advance, deeming it disrespectful to pursue a retreating army. Mahmud II then offered the king the opportunity to regain control of his vassal province if he would let him leave in peace, but the monarch categorically refused and resumed his march towards the Shirvan capital after defeating an army of 4,000 Seljuks led by the Atabeg of Arran. Once he had laid siege to Shamakhi, the Seljuk left the city in a hurry via the commune's excrement drainage system.
In June 1123, a month after the defeat of the Seljuks, David IV invaded Shirvan, starting by capturing the town of Gulistan. He soon dethroned his own son-in-law, establishing him in Georgia and directly annexing the region. This act allows Georgia to reach its greatest extent since the beginning of its history. Indeed, for the first time Georgia extended from the Black Sea to the Caspian Sea and from the Greater Caucasus to Northern Armenia.

### Georgian power on Caucasus

The resumption of Tbilisi and the conquest of Shirvan not only completed the long process of the unification of Georgia which began at the end of the 10th century, but henceforth gave the kingdom a regional reputation as protector of Christianity and brought different peoples of South Caucasus to ask for help from David IV against the Muslim forces. This fact further encourages the Georgian monarch, one of whose plans is to secure the entire Caucasus by establishing Georgian domination there, with a view to effective defense against the Turks. As seen above, the North Caucasus was already under the cultural and political influence of the Kingdom of Georgia at the start of the Georgian–Seljuk wars, while Derbent becomes a more or less faithful vassal of Georgia and Shirvan is forced to submit.
The conflict against the Crusaders in the Middle East was also one of the main factors breaking the backbone of Turkish power. This therefore allowed the king of Georgia to continue his momentum towards the south after the capture of Dmanisi, in particular towards the historic territories of Armenia. In May 1124, Georgian troops led by David the Builder entered southern Transcaucasia and within a few days captured many Armenian strongholds, such as the fortresses of Gagni, Teronakal, Kavazani, Norbed, Manasgonmni and Talinjakari. The following month, the king, after returning to Georgia proper, resumed his journey and crossed the Javakheti, Kola, Carnipola and the Basiani and destroyed all Seljuk installations there, before reaching the town of Speri, in Tao-Klarjeti. After this offensive, he continued his way into Tao-Klarjeti and burned Oltisi after taking Bouïatha-Qour.
Having learned of the liberation of the Christian cities by the king of Georgia, the nobility of the ancient Armenian capital, Ani, sent representatives to David IV on August 20, 1124, to the source of the Bojana. Indeed, Ani had been in Muslim hands since its capture by Alp Arslan in 1064 and a forced Islamization of the city had taken place since the sale of Ani to the Shaddadids, to the discontent of the local Christian population. The said representatives then offered the monarch the surrender of the city. Taking this opportunity in hand, David summoned all his armies and entered Armenia with 60,000 men to take the city. Without a single fight, the Armenian population of Ani opened the gates to the Georgians, who captured Emir Abu'l-Aswar Shavur ibn Manuchihr (r. 1118-1124) and exiled him and his family to Abkhazia. The region was then left to the governance of the Meskhetian nobility, to General Abuleti and his son Ivane. Armenian families (including many dispossessed nobles) subsequently established themselves in Georgia proper and the royal power built the city of Gori for them. Northern Armenia was thus annexed and incorporated into the Kingdom of Georgia, increasing the power of David IV in the region.
Georgia's conquest of Northeast Armenia finally completed the ultimate project of securing South Caucasus against the Turkish threat. For the first time, the entire Caucasus is unified culturally, spiritually and politically under a single scepter, this being Georgia. The written tradition relates the borders of the Georgian world of the time, describing it as going from "Nicopsia to Derbent and from Alania to Aragats", i.e. from one sea to the other, and from the North Caucasus to Armenia. The deliverance of North-Eastern Armenia in fact guarantees this power, reflected in the official title of the Georgian king: “King of Kings, of the Abkhazians, Iberians, Ranis, Kakhetians, Armenians, of Shaki, Alania and the Rus, Sword of the Messiah, emperor (basileus) of all the East, the invincible, servant and defender of God, the Orthodox king.
Despite his advanced age, David IV continued his military actions during the last years of his reign. For example, in April 1124, he took the town of Chabran after an attack against his vassal of Emirate of Derbent. Still in the region, after having defeated a North Caucasian army composed of Kurds, Lezgins and anti-Georgian Kipchaks, he captured the citadels of Ghasanni and Khozaond, during an obscure campaign north of the Caspian Sea. Another military campaign was organized in September in Shirvan, under obscure circumstances. The king managed to recover Shamakhi and took the citadel of Bigrit, before strengthening his power in Hereti and Kakheti by leaving strong garrisons of soldiers there. In January 1125, shortly before his death, David once again faced Muslim attackers, led by the Emir Ibrahim ibn-Suleiman. The latter, accompanied by Emir Davout ibn-Soukman of Hantzit, however failed to achieve a victory over the kingdom of Georgia and the Christian sovereign managed to massacre the invaders after five days of battle.

### Death and burial
#### Death

Subsequently, David IV began to organize plans for new large-scale campaigns for the coming spring. However, the weakness caused by his illness and his age prevented him from continuing this project and he was forced to let his Mtsignobartukhutsesi Simon of Chqondidi take care of the affairs of the country. The long reign of thirty-four years of David IV the Builder ended abruptly on January 24, 1125. The king died in his capital Tbilisi, after having appointed his eldest son Demetrius as successor, transmitting to him the Georgian royal attributes, consisting of a crown of precious stones, a scimitar and purple kneepads and sleeves. The king was buried, following his request, in the Gelati Monastery. His tomb is placed, again according to his will, at the main entrance of this religious building that he had built, so that anyone coming to his beloved Gelati Academy stepped on his tomb first.

#### Burial

A tombstone at the entrance of Gelati monastery, bearing a Georgian inscription in the asomtavruli script, has traditionally been considered to be that of David IV. Although there are no clear and reliable indications that David was indeed buried in Gelati and that the present epitaph is his, this popular belief had already been established by the mid-19th century as evidenced by the French scholar Marie-Félicité Brosset who published his study of the Georgian history between 1848 and 1858. The epitaph, modeled on the Psalm 131 (132), 14, reads: "Christ! This is my resting place for eternity. It pleases me; here I shall dwell."

## Personal life

The Georgian Chronicles are an important source not only on the course of the reign of David IV the Builder, but also on the private life of the Christian king, reporting his activities and personality. According to these, David IV is a very pious king following Christian traditions, David IV spends his time informing himself, criticizing and learning several episodes from the Bible. According to his biographer, David IV learned to live according to the Christian religion from an early age and continued throughout his life. David himself composed, c. 1120, "Hymns of Repentance" (გალობანი სინანულისანი, galobani sinanulisani), a sequence of eight free-verse psalms, with each hymn having its own intricate and subtle stanza form. For all their Christianity, cult of the Mother of God, and the king's emotional repentance of his sins, David sees himself to be similar to the Biblical David, with a similar relationship to God and to his people. His hymns also share the idealistic zeal of the contemporaneous European crusaders to whom David was a natural ally in his struggle against the Seljuks. Furthermore, the Armenian version of the Chronicles indicates the name of the king's confessor (who knows Armenian), Hovhannes Imastaser of Haghpat.
David IV the Builder also engaged in important charitable activities. Indeed, he built hospitals in the country for the sick, which he took care of occasionally, as described in the chronicles:
   He had yet another thought, following the example of the good God, gentle and merciful, loving men; it was to build a hospice, in a beautiful and suitable place, where he gathered his brothers afflicted with various illnesses, provided for all their needs, with generous lavishness and assigned income to meet their needs. He himself came to see them, questioned them, kissed them one after the other, lavished on them the tender care of a father, complimented them, encouraged them to be patient, arranged their clothes, their clothes with his own hands. beds, their mattresses, their dishes, and all their utensils; gave everyone abundant alms, animated their supervisors and put their affairs in the most beautiful order, following the spirit of religion.
The king has several residences across the country. The most important are the royal palaces of Kutaisi and Tbilisi, but David also has residences in Tsaghoulistavi and Abkhazia. It spends most of its winters until February in this latter region with a Mediterranean climate, notably in the coastal town of Bichvinta. During these stays, the kingdom is administered by its faithful general Theodore. David IV is also fond of hunting and has vast territories for hunting deer and wild boar in his domains of Kartli or Geguti.
King David the Builder gave close attention to the education of his people. The king selected children who were sent to the Byzantine Empire "so that they be taught languages and bring home translations made by them there". Many of them later became well-known scholars.
David's chronicler claimed that "he knew the deeds better than any other king" because he was enthralled with theology, astrology, and history, and he brought his books with him on campaign. It seems that he read both Persian poetry and the Qur'an.
At the time of David the Builder there were quite a few schools and academies in Georgia, among which Gelati occupies a special place. King David's historian calls Gelati Academy
   a second Jerusalem of all the East for learning of all that is of value, for the teaching of knowledge – a second Athens, far exceeding the first in divine law, a canon for all ecclesiastical splendors.
Besides Gelati there also were other cultural-enlightenment and scholarly centers in Georgia at that time, e.g. the academy of Ikalto.

## Family

David had two wives: one, an unnamed Armenian woman, and the other, Gurandukht, a Cuman-Kipchak, who is the only one clearly identified.
According to the Life of King of Kings David, David IV had four children:
* Demetrius I of Georgia (c. 1093–1156), King of the Kingdom of Georgia (1125–1155, 1155–1156).
* Tamar, who married Manuchihr III of Shirvan and later became a nun.
* Kata, who married into the Byzantine imperial family around 1116.
* Vakhtang (1118–1138), he attempted a coup against his half-brother, Demetrius I, and was captured, blinded, and imprisoned, and died shortly after.
Cyril Toumanoff also suggests three other possible children:
* Rusudan, who married Jadaron, son of the Alanian king Athon.
* Zurab, otherwise unknown.
* George, referenced in the 13th-century Armenian chronicle by Vardan Areveltsi.

## Legacy

Georgian historiography today portrays David IV as a king that few Georgian sovereigns can match. In fact, the majority of current historians agree to qualify David as the most prestigious Georgian monarch in history and make his reign the beginning of the Golden Age of the Kingdom of Georgia, an era which completed only under the reign of Rusudan (r. 1223–1245). According to his contemporary biographer, his actions earned him the title of Builder upon his death. It is notably celebrated by the poet Ioane Shavteli in his cycle of praise Abdulmesiani, jointly with Tamar.
David the Builder occupies a special place among the kings of the Georgian Golden Age in the period of the defense against the Seljuks.
The "Order of David the Builder" is given to regular citizens, military and clerical personnel for outstanding contributions to the country, for fighting for the independence of Georgia and its revival, and for significantly contributing to social consolidation and the development of democracy.
The sovereigns succeeding David IV had great respect for him and his actions allowed him to maintain an international reputation for several decades: for example, while King Bagrat V (r. 1360–1395) was held captive by Timur, he offered the Turco-Mongol emir a coat of mail of precious work having belonged to David the Builder, following which Timur, appreciating this present, frees the king and makes him his favorite. More recently, the memory of David IV was revived in 1995 during the inauguration speech of Eduard Shevardnadze, who cited him with other kings as the builder of the Georgian nation. Furthermore, President Mikheil Saakashvili states that his role model is King David IV; in commemoration of the country's national unity, Saakashvili organized an inauguration ceremony in the Gelati Cathedral where he was blessed by the Catholicos-Patriarch of All Georgia Ilia II in January 2004.
The airport at Kutaisi is known as David the Builder Kutaisi International Airport. The National Defence Academy is named after him.
David IV of Georgia has several monuments, buildings and streets named after him across Georgia. The Russian-Georgian sculptor Merab Berdzenishvili built an important monument to David the Builder, which he offered to the municipality of Tbilisi. In addition, a university named after the former king was opened in 1991. One can also find an important avenue in the Georgian capital named after David IV of Georgia. A military decoration is finally dedicated to the Georgian king.
Furthermore, David IV of Georgia is considered a saint by the Orthodox Churches as well as by Western faiths. However, he was never canonized and his sanctification was the result of a historical and popular process. Cited as the protector of the Georgian nation, he is celebrated on January 24 in the West and January 26 in the East. Many churches currently bear his name, including a Georgian church dedicated in 2009 in Pennsylvania (United States).