 The original Uch-Karluk confederation became split between the Karakhanid state in the west and the Karakhitay state in the east, lasting until the Mongol invasion.Both in the west and east, Karluk principalities retained their autonomous status and indigenous rulers, though in Karakhitay the Karluk khan, like the ruler of Samarkand, was forced to accept the presence of a permanent representative of the Gurkhan.The Gurkhans administered limited territories, populated in 1170 by 84,500 families under direct rule.