In ca. 1127, a Byzantine–Hungarian war broke out, with the Hungarians taking over Belgrade, then penetrating to Niš, Sofia, and Philippopolis, after which John II Komnenos defeated them with infantry and navy on the Danube. The Serbs, who had in the meantime recognized Byzantine rule, expelled the Byzantine governor at Ras, Kritopl, who fled to Constantinople where he was ridiculed.