after he had secured his patrimony, bagrat proceeded to press a claim to the easternmost georgian principality of kakheti and annexed it in or around 1010, after two years of fighting and aggressive diplomacy. this formidable acquisition brought bagrat’s realm to the neighbourhood of the shaddadid emirate of arran in what is now azerbaijan, whose ruler al-fadl i b. muhammad (986–1031) raided kakheti following its incorporation into georgia. bagrat drove back this incursion and, in alliance with the armenian king gagik i (989–1020), successfully campaigned against the shaddadid city of shamkir, levying a tribute upon it. yet bagrat’s foreign policy was generally peaceful and the king successfully manoeuvred to avoid the conflicts with both the byzantine and muslim neighbours even though thither tao remained in the byzantine and tbilisi in the arab hands.