as a reward for the contribution in struggle against the arab occupation, the iberian ruler ("erismtavari") archil gave hereti to the noble family of bagrationi in the 740s–750s. after the death of the last iberian princes john and juansher, the heretian lords extended their fiefdoms and, in 787, established an independent principality ("samtavro") with the capital in shaki.