The Battle of Didgori was fought between the armies of the Kingdom of Georgia and the Seljuk Empire at the narrow place of Didgori, 40 km west of Tbilisi, on August 12, 1121. The large Muslim army, under the command of Ilghazi, was unable to maneuver and suffered a devastating defeat due to King David IV of Georgia's effective military tactics.
The battle at Didgori was the culmination of the entire Georgian–Seljuk wars and led to the Georgians' reconquest of Tbilisi in 1122. Soon after that David moved the capital from Kutaisi to Tbilisi. The victory at Didgori inaugurated the medieval Georgian Golden Age and is celebrated in The Georgian Chronicles as a (ძლევაჲ საკვირველი dzlevay sak'virveli lit. the "miraculous victory"). Modern Georgians continue to remember the event as an annual August 12 festival known as Didgoroba ("[the day] of Didgori").
The Kingdom of Georgia had been a tributary to the Great Seljuq Empire since the 1080s. However, in the 1090s, the energetic Georgian king David IV was able to exploit internal unrest in the Seljuq state and the success of the Western European First Crusade against Muslim control of the Holy Land, and established a relatively strong monarchy, reorganizing his army and recruiting Kipchak, Alan, and even Frankish mercenaries to lead them to the reconquest of lost lands and the expulsion of Turkish raiders. David's battles were not, like those of the Crusaders, part of a religious war against Islam, but rather was a political-military effort to liberate Caucasus from the nomadic Seljuks.
David renounced the tribute to the Seljuqs in 1096/97, and put an end to the seasonal migrations of the Turks into Georgia. Following the annexation of Kingdom of Kakheti, in 1105, David routed a Seljuk punitive force at the Battle of Ertsukhi, leading to momentum that helped him to secure several key fortresses in a series of campaigns from 1103 to 1118.
Georgia having been at war for the better part of twenty years, needed to be allowed to become productive again.