Popularly considered to be the greatest and most successful Georgian ruler in history, he succeeded in driving the Seljuk Turks out of the country, winning the major 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 Christianculture, he was canonized by the Georgian Orthodox Church.

The epithet aghmashenebeli (აღმაშენებელი), which is translated as "the Builder" (in the sense of "built completely"), "the Rebuilder",[3] or "the Restorer",[4][5] 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.[6]Epigraphic data also provide evidence for the early use of David's other epithet, "the Great" (დიდი, didi).[7]

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, owing to the fact that the numbering of successive rulers moves between the many branches of the family.[8][9] Scholars in Georgia favor David IV,[8] his namesake predecessors being: David I Curopalates (died 881), David II Magistros (died 937), and David III Curopalates (died 1001), all members of the principal line of the Bagratid dynasty.[10]

The year of David's birth can be calculated from the date of his accession to the throne recorded in the Life of King of Kings David (ცხორებაჲ მეფეთ-მეფისა დავითისი), written c. 1123–1126,[11][12] as k'oronikon (Paschal cycle) 309, that is, 1089, when he was 16 years old. Thus, he would have been born in k'oronikon 293 or 294, that is, c. 1073. According to the same source, he died in k'oronikon 345, when he would have been in his 52nd or 53rd year. Professor Cyril Toumanoff gives 1070 and 24 January 1125 as the dates for David.[13] The earliest known document that makes mention of David is the royal charter of his father, George II of Georgia (r. 1072–1089), granted to the Mghvime monastery and dated to 1073.[14]

According to the Life of King of Kings David, David was the only son of George II. The contemporaneous Armenian chronicler Matthew of Edessa mentions David's brother Totorme,[15] who, according to the modern historian Robert W. Thomson, was his sister.[13] The name of David's mother, Elene, is recorded in a margin note in the Gospel of Matthew from the Tskarostavi monastery; she is otherwise unknown.[16] David bore the name of the biblical king-prophet, from whom the Georgian Bagratids claimed their descent and whose 78th descendant David was proclaimed to be.[13]

David's father, George II, was confronted by a major threat to the kingdom of Georgia. The country was invaded by the Seljuq Turks, which were part of the same wave which had overrun Anatolia, defeating the Byzantine Empire and taking captive the emperor Romanos IV Diogenes at the battle of Manzikert in 1071.[17] In what the medieval Georgian chronicle refers to as didi turkoba, "the Great Turkish Invasion", several provinces of Georgia became depopulated and George was forced to sue for peace, becoming a tributary of the sultan Malik-Shah I in 1083. The great noble houses of Georgia, capitalizing on the vacillating character of the king, sought to assert more autonomy for themselves; Tbilisi, the ancient capital of Kartli, remained in the hands of its Muslim rulers, and a local dynasty, for a time suppressed by George's energetic father Bagrat IV, maintained its precarious independence in the eastern region of Kakheti under the Seljuq suzerainty.[18]

Watching his kingdom slip into chaos, George II, ceded the crown to his 16-year old son David in 1089. Although the historical tradition founded by Prince Vakhushti in the 18th century and followed by Marie-Félicité Brosset in the 19th makes David succeed George upon his death, a number of surviving documents suggest that George died around 1112 and he retained the royal title until his death,[19][20] but he played no significant role and real power remained with David.[20] Moreover, David himself had been a co-ruler with his father sometime before his becoming a king-regnant in 1089; a document of 1085 mentions David as "king and sebastos", the latter being a Byzantine title,[19] frequently held, like other imperial dignities, by the members of the Georgian royal family. David's formal cooption into government may have occurred even earlier, in 1083, when George II left Georgia for the negotiations at the court of the Seljuq sultan Malik-Shah I.[14]

Despite his age, he was actively involved in Georgia’s political life. Backed by his tutor and an influential churchman George of Chqondidi, David IV pursued a purposeful policy, taking no unconsidered step. He was determined to bring order to the land, bridle the unsubmissive secular and ecclesiastic feudal lords, centralize the state administration, form a new type of army that would stand up better to the Seljuk Turkish military organization, and then go over to a methodical offensive with the aim of expelling the Seljuks first from Georgia and then from the whole Caucasus. Between 1089–1100, King David organized small detachments of his loyal troops to restore order and destroy isolated enemy troops. He began the resettlement of devastated regions and helped to revive major cities.[21] Encouraged by his success, but more importantly the beginning of the Crusades in Palestine, he ceased payment of the annual contribution to the Seljuks and put an end to their seasonal migration to Georgia. In 1101, King David captured the fortress of Zedazeni, a strategic point in his struggle for Kakheti and Hereti, and within the next three years he liberated most of eastern Georgia.

In 1093, he arrested the powerful feudal lord Liparit Baghvashi, a long-time enemy of the Georgian crown, and expelled him from Georgia (1094). After the death of Liparit’s son Rati, David abolished their duchy of Kldekari in 1103.

He slowly pushed the Seljuk Turks out of the country, recovering more and more land from them as they were now forced to focus not only on the Georgians but the newly begun Crusades in the eastern Mediterranean.[22] By 1099 David IV's power was considerable enough that he was able to refuse paying tribute to the Turks. By that time, he also rejected a Byzantine title of panhypersebastos[23] thus indicating that Georgia would deal with the Byzantine Empire only on a parity basis.

In 1103 a major ecclesiastical congress known as the Ruis-Urbnisi Synod was held at the monasteries of Ruisi and Urbnisi. David succeeded in removing oppositionist bishops, and combined two offices: courtier’s (Mtzignobartukhutsesi, i.e. Chief Secretary) and clerical (Bishop of Tchqondidi) into a single institution of Tchqondidel-Mtzignobartukhutsesi corresponding roughly to the post of prime minister.

Next year, David’s supporters in the eastern Georgian province of Kakheti captured the local king Aghsartan II (1102–1104), a loyal tributary of the Seljuk Sultan, and reunited the area with the rest of Georgia.

Following the annexation of Kakheti, in 1105, David routed a Seljuk punitive force at the Battle of Ertzukhi, leading to momentum that helped him to secure the key fortresses of Samshvilde, Rustavi, Gishi, and Lori between 1110 and 1118.

Problems began to crop up for David now. His population, having been at war for the better part of twenty years, needed to be allowed to become productive again. Also, his nobles were still making problems for him, along with the city of Tbilisi which still could not be liberated from Seljuk grasp. Again David was forced to solve these problems before he could continue the reclamation of his nation and people. For this purpose, David IV radically reformed his military. He resettled a Kipchak tribe of 14,000 families from the Northern Caucasus in Georgia in 1118–1120. Every Georgian and Kipchak family was obliged to provide one soldier with a horse and weapons. This 56,000 men strong army was entirely dependent on the King. Kipchaks were settled in different regions of Georgia. Some were settled in Inner Kartli province, others were given lands along the border. They were quickly assimilated into Georgian society.

In 1120 David IV moved to western Georgia and, when the Turks began pillaging Georgian lands, he suddenly attacked them. Only an insignificant Seljuk force escaped. King David then entered the neighbouring Shirvan and took the town of Qabala.

In the winter of 1120–1121 the Georgian troops successfully attacked the Seljuk settlements on the eastern and southwestern approaches to the Transcaucasus.

Muslim powers became increasingly concerned about the rapid rise of a Christian state in southern Caucasia. In 1121, Sultan Mahmud b. Muhammad (1118–1131) declared a holy war on Georgia and rallied a large coalition of Muslim states led by the ArtuqidNajm al-din El-ğazi and Toğrul b. Muhammad. The size of the Muslim army is still a matter of debate with numbers ranging from fantastic 600,000 men (Walter the Chancellor’s Bella Antiochena, Matthew of Edessa) to 400,000 (Smbat Sparapet’s Chronicle) to modern Georgian estimates of 250,000–400,000 men. All sources agree that the Muslim powers gathered an army that was far much larger than the Georgian force of 56,000 men. However, 12 August 1121, King David routed the enemy army on the fields of Didgori, achieving what is often considered the greatest military success in Georgian history. The victory at Didgori signaled the emergence of Georgia as a great military power and shifted the regional balance in favor of Georgian cultural and political supremacy.

Following his success, King David captured Tbilisi, the last Muslim enclave remaining from the Arab occupation, in 1122 and moved the Georgian capital there. A well-educated man, he preached tolerance and acceptance of other religions, abrogated taxes and services for the Muslims and Jews, and protected the Sufis and Muslim scholars. In 1123, David’s army liberated Dmanisi, the last Seljuk stronghold in southern Georgia. In 1124, David finally conquered Shirvan and took the Armenian city of Ani from the Muslim Emirs, thus expanding the borders of his kingdom to the Araxes basin. Armenians met him as a liberator providing some auxiliary force for his army. It was when the important component of "Sword of the Messiah" appeared in the title of David the Builder. It is engraved on a copper coin of David's day:

“

King of Kings, David, son of George, Sword of the Messiah.

”

Humane treatment of the Muslim population, as well as the representatives of other religions and cultures, set a standard for tolerance in his multiethnic kingdom. It was a hallmark not only for his enlightened reign, but for all of Georgian history and culture.

David the Builder died on 24 January 1125, and upon his death, King David was, as he had ordered, buried under the stone inside the main gatehouse of the Gelati Monastery so that anyone coming to his beloved Gelati Academy stepped on his tomb first, a humble gesture for a great man. He had three children, the son Demetrius, who succeeded him and continued his father's victorious reign; and two daughters, Tamar, who was married to the Shirwan Shah Akhsitan (Aghsartan in Georgian), and Kata (Katai), married to Isaakios Comnenus, the son of the Byzantine EmperorAlexius I Comnenus. Beside his political and military skills, King David earned fame as a writer, composing Galobani sinanulisani (Hymns of Repentance, c. 1120), a powerful work of emotional free-verse psalms, which reveal the king’s humility and religious zeal.

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.

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.

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 as reincarnating 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.[24]

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 Psalm131 (132), 14, reads: "Christ! This is my resting place for eternity. It pleases me; here I shall dwell."[25]

^Fighting against the Seljuks, Georgia and the Crusaders developed fairly friendly relations. A 13th-century anonymous Georgian author (conventionally known as the First Chronicler of Queen Tamar) as well as Abul-Faraj gives a version, though unproven otherwise, about the participation of a Georgian auxiliary force in the Siege of Jerusalem (1099). Some 300 Crusaders (known to the Georgians as Franks) are also known to take part in the famous Battle of Didgori (1121). King Baldwin II of Jerusalem is said by the historian Ioane Bagrationi, who refers to unknown medieval sources, to have visited incognito David IV’s court

^Since the Bagrationi dynasty established the Tao-Klarjeti principality under the Byzantine protectorate in 813, representatives of the dynasty had been granted various Byzantine titles such as kouropalates, magistros, sebastos, etc. David was the last Georgian monarch to wear a Byzantine title.