A feud between Bagrat IV and his former general, Liparit Baghvashi, a powerful duke of
Kldekari, erupted during their campaign against the Georgian city of
Tbilisi (1037–1040), which at the time was ruled by
Arab emirs. The king, advised by Liparit's opponents, made peace with Emir Ali ibn-Jafar, a sworn enemy of the duke, in 1040. In retaliation, Liparit revolted and endeavoured to put
Demetrius, Bagrat's half-brother, on the
Georgian throne. However, he had no success and ended hostilities with Bagrat, receiving the title of Grand Duke of
Kartli, but giving up his son, Ioane, as a hostage of the king. Soon Liparit rose again in rebellion, requesting
Byzantine aid. Supported by a Byzantine force and an army of
Kakheti (a kingdom in eastern Georgia), he released his son and again invited the pretender prince Demetrius to be crowned king. Demetrius later died at the very beginning of the war, but Liparit continued to fight the king's forces. == Battle ==