Demetrius was the eldest son of King David the Builder by his first wife Rusudan. He was brought up in Kutaisi. As a commander, he took part in his father's battles against Seljuks, particularly at Didgori (1121) and Shirvan (1123). In 1117, he was sent by David at the head of a Georgian army into Shirvan, where Demetrius reduced the fortress of Kaladzor (later Alberd, now Ağdaş) and put to flight the men of Sukman, "commander of all the forces of Persia" — as a Georgian chronicler suggests. This Sukman was probably a Shah-Armen prince, and subsequently, ruler in his own right, Sökmen II, whom the Shirvanshah Afridun I must have applied for help. Demetrius succeeded on his father's death on January 24, 1125.