in 1038 liparit iv, duke of kldekari was on the verge of capturing the georgian city of tbilisi, which had been under the muslim sway for centuries; but fearing his growing power the georgian nobles thwarted the plan and persuaded the king to make peace with the emir of tbilisi. as a result, liparit turned into a sworn enemy of bagrat and began actively cooperating with foreign powers for vengeance. in 1039, he pledged his support to bagrat’s half-brother demetrius of anacopia who returned to georgia with a byzantine army to seize the crown.