Ioannes II decided to expel barbarian invaders of Armeniakon and to arrest Konstantinos Gabras, ruler of Trebizond. He chose to advance along the coast, to obtain supplies from his own provinces and to be protected by the sea, fighting, if necessary, only on one side. He had to guard against the growing power of the Danishmendid emir Muhammad, with the most warlike of antecedents, ruling from Kaisareia, and controlling a part of Iberia and some of Mesopotamia. He set out at the end of spring, campaigned in the summer and autumn, and in December took up winter quarters at Kinte in Pontos