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).