an independent people. John's marriage to the Hungarian princess Piroska involved him in the dynastic struggles of the Kingdom of Hungary. In giving asylum to Álmos, a blinded claimant to the Hungarian throne, John aroused the suspicion of the Hungarians. The Hungarians, led by Stephen II, then invaded Byzantium's Balkan provinces in 1127, with hostilities lasting until 1129 The Hungarians attacked Belgrade, Nish and Sofia; John, who was near Philippopolis in Thrace, counterattacked, supported by a naval flotilla operating on the Danube. After a challenging campaign, the details of which are obscure, the emperor managed to defeat the Hungarians and their Serbian allies at the fortress of Haram or Chramon, which is the modern Nova Palanka. Following this the Hungarians renewed hostilities by attacking Braničevo, which was immediately rebuilt by John. Further Byzantine military successes, Choniates mentions several engagements, resulted in a restoration of peace. The Danube frontier had been definitively secured. John was then able to concentrate on Asia Minor, which became the focus of his attention for most of his reign. The Turks were pressing forward against the Byzantine frontier, and John was determined to drive them back. Thanks to John's energetic campaigning, Turkish attempts at expansion in Asia Minor were halted, and John prepared to take the fight to the enemy. In order to restore the region to Byzantine control, John led a series of campaigns against the Turks, one of which resulted in the reconquest of the ancestral home of the Komneni at Kastamonu. He quickly earned a formidable reputation as a wall-breaker, taking stronghold after stronghold from his enemies. Regions which had been lost to the empire in the aftermath of Manzikert were recovered and garrisoned. Yet resistance, particularly from the Danishmends of the north-east, was strong, and the difficult nature of holding down the new conquests is illustrated by the fact that Kastamonu was recaptured by the Turks whilst John was back in Constantinople celebrating its return to Byzantine rule. John persevered, and Kastamonu soon changed hands once more. He advanced into north-eastern Anatolia, provoking the Turks to attack his army. Unlike Romanos Diogenes, John's forces were able to maintain their cohesion, and the Turkish attempt to inflict a second Manzikert on the emperor's army backfired when the Sultan, discredited by his failure, was murdered by his own people. John, like Basil II before him, was a slow but steady campaigner. His armies made