King David IV and Reconquista
The struggle against the Seljuq invaders in Georgia was led by the young King David IV of the Bagrationi royal family, who inherited the throne in 1089 at the age of 16 after the abdication of his father George II Bagrationi. Soon after coming to power, David created the regular army and peasant militia in order to be able to resist Seljuq colonization of his country. The First Crusade (1096–1099) and the Crusaders' offensive against the Seljuq Turks in Anatolia and Syria favored David's successful campaigns in Georgia. By the end of 1099 David had stopped paying tribute to the Seljuqs and had liberated most of the Georgian lands, with the exception of Tbilisi and Hereti. In 1103 he reorganized the Georgian Orthodox Church and closely linked it with the state by appointing as Catholicos (Archbishop) a Crown Chancellor (Mtsihnobart Ukhutsesi) of Georgia. In 1103–1105 the Georgian army took over Hereti and made successful raids into still Seljuq-controlled Shirvan. Between 1110 and 1118 David took Lori, Samshvilde, Rustavi and other fortresses of lower Kartli and Tashiri, thus turning Tbilisi into an isolated Seljuq enclave.
In 1118–1119, having considerable amounts of free, unsettled land as a result of the withdrawal of Turkish nomads, and desperately needing qualified manpower for the army, King David invited some 40,000 Kipchak warriors from North Caucasus to settle in Georgia with their families. In 1120 the ruler of Alania recognized himself as King David's vassal and afterwards sent thousands of Alans (allegedly modern day Ossetians) to cross the main Caucasus range into Georgia, where they settled in Kartli. The Georgian Royal army also welcomed mercenaries from Germany, Italy, and Scandinavia (all those westerners were defined in Georgia as "the Franks") as well as from Kievan Rus.
In 1121, the Seljuq Sultan Mahmud declared Jihad on Georgia and sent a strong army under one of his famous generals Ilghazi to fight the Georgians. Although significantly outnumbered by the Turks, the Georgians managed to defeat the invaders at the Battle of Didgori, and in 1122 they took over Tbilisi, making it Georgia's capital. Three years later the Georgians conquered Shirvan. As a result, the mostly Christian-populated Ghishi-Kabala area in western Shirvan (a relic of the once prosperous Albanian Kingdom) was annexed by Georgia while the rest of already Islamicized Shirvan became Georgia's client-state. In the same year a large portion of Armenia was liberated by David's troops and fell into Georgian hands as well. Thus in 1124 David also became the King of Armenians, incorporating Northern Armenia into the lands of the Georgian Crown. In 1125 King David died, leaving Georgia with the status of a strong regional power. In Georgia, King David is called Agmashenebeli (English: the builder).
David Agmashenebeli's successors (Kings Demeter I, David V and George III) continued the policy of Georgia's expansion by subordinating most of the mountain clans and tribes of North Caucasia and further securing Georgian positions in Shirvan. However, the most glorious sovereign of Georgia of that period was definitely Queen Tamar (David's great-granddaughter).