The Georgian King David IV (d. 1125) wasn’t given the epithet “The Builder,” or perhaps “The Rebuilder,” because he could put together a mean castle or fix a crack in your home’s foundation. He’s regarded as the restorer of the Georgian nation after its subjugation by the Seljuk Turks in the late 11th century and is regarded as perhaps the greatest ruler in Georgian history, in addition to being a saint in the Georgian Orthodox Church. It seems like he was a pretty impressive guy. The Battle of Didgori is where David IV really began to cement his legacy as David the Builder, because it was here that his outnumbered army, with a little assistance from the Crusaders and a lot of assistance from technology, trounced the Seljuks and effectively won Georgia’s independence.
The Seljuk migration from Central Asia hit the Middle East, Anatolia, and the Caucasus suddenly and with tremendous force, and fundamentally altered the landscape in those regions. The Battle of Manzikert (1071) alone is one of the most consequential events in world history, because it finally pierced the Byzantine Empire’s defenses around Anatolia and led to Anatolia’s Turkicization, to a steep Byzantine decline, and (as a result) to the Crusades. The Seljuks overran the Caucasus as well as Anatolia, and in 1083 the Georgian King George II was forced to reduce his kingdom to the status of a Seljuk vassal. Prior to that (in the 1060s), the Seljuks, following a long line of foreign conquerors, sacked and occupied Tbilisi, the historic capital of eastern Georgia going back to late antiquity.
When exactly David became king isn’t entirely clear, but it seems that George II effectively abdicated in favor of his son in 1089, a few years after he had surrendered to the Seljuks. Although George II kept his royal title until his death in (probably) 1112, David held power from that point forward. In addition to a series of centralizing reforms that enabled him to take direct control over whatever was left of independent Georgia, he apparently undertook a total revamp of the Georgian army to focus on something the Seljuks didn’t have: heavy cavalry. In addition to reorganizing his own Georgian forces, he also bolstered the army (and repopulated his kingdom, which had been depleted by the Seljuk invasion) by inviting thousands of Kipchaks from the Eurasian steppe to resettle on his lands in exchange for military service. David and his new army consolidated control over as much of Georgia as they could until the late 1090s brought a present from the west: the arrival of the Crusaders, who immediately took the lion’s share of the Seljuks’ attention. It was at that point that David stopped making tribute payments to the Seljuks and Georgia reasserted its independence.
By 1121, with things in the Holy Land in something of a holding pattern and the Seljuks increasingly worried about David’s slowly expanding Caucasian dominion, Seljuk Sultan Mahmud II (d. 1131) ordered an army, composed of troops provided by a number of Muslim emirates in the Caucasus and under the command of the Emir of Mardin (in southeastern Anatolia), Ilghazi (d. 1122), to invade the Caucasus and bring David to heel. The combined Muslim army (which I’ll call “the Seljuks” even though they were all Seljuk vassals rather than the Seljuks themselves) was probably in the triple digits, maybe as large as 250,000 men but likely closer to 100,000, while the Georgians numbered about 55,000, but David had two things going for him: his heavy cavalry, and his own abilities as a field commander.
You can read about the Georgian battle plan in more detail here, but I’ll give you the bullet points. David deployed the bulk of his cavalry on the wings of his army, with one wing under his command and the other commanded by his son, Demetrius, but kept these wings hidden from the Seljuks, who concentrated their focus on the center of the Georgian line, where its infantry was stationed along with the Kipchaks and a detachment of additional cavalry sent by the Crusader King Baldwin II of Jerusalem. David further demonstrated his tactical abilities by sending a force, posing either as deserters or as diplomats, to enter the Seljuk camp, obtain an audience with their commanders, and then attack them–the 12th century version of a decapitation strike. When the infiltration force launched its attack, the Crusader cavalry launched a frontal assault, and once the Seljuks had committed to that assault, the two wings of heavy cavalry were ordered to smash into either flank of the Seljuk army. At that point, the Kipchaks were ordered to deliver the final blow. The combined effect was total devastation. Many Seljuk commanders were killed early on (Ilghazi was wounded but managed to get away), leaving their forces leaderless, and when the battle was over most of the Seljuk army was either dead or captured, and any soldiers who weren’t either of those things were instead on the run.
David’s greatest symbolic victory, the one that really made him The Builder, came the following year, when he captured Tbilisi and the city finally, after centuries during which it was constantly falling into the hands of this or that invading power, became the capital of the Georgian kingdom. It wouldn’t stay that way–once the Mongols showed up in the Caucasus, Tbilisi once again came under foreign domination. But David is nevertheless credited with establishing Tbilisi as the permanent urban center of the Georgian people, a development that was made possible by his victory at Didgori.