Cuman questionStari Slankamen, Serbia
Pope Nicholas III sent Philip, bishop of Fermo, to Hungary to help Ladislaus restore royal power on 22 September 1278. The papal legate arrived in Hungary in early 1279. With the legate's mediation, Ladislaus concluded a peace treaty with the Kőszegis. Bishop Philip soon realized, however, that most Cumans were still pagans in Hungary. He extracted a ceremonious promise from the Cuman chieftains of giving up their pagan customs, and persuaded the young King Ladislaus to swear an oath to enforce the keeping of the Cuman chieftains' promise. The Cumans did not obey the laws, however, and Ladislaus, himself a half-Cuman, failed to force them. In retaliation, Bishop Philip excommunicated him and placed Hungary under interdict in October. Ladislaus joined the Cumans and appealed to the Holy See, but the Pope refused to absolve him.
On Ladislaus's demand, the Cumans seized and imprisoned Philip of Fermo in early January 1280. However, Finta Aba, voivode of Transylvania captured Ladislaus and handed him over to Roland Borsa. In less than two months, both the legate and the king were set free and Ladislaus took a new oath to enforce the Cuman laws. However, many Cumans decided to leave Hungary instead of obeying the legate's demands. Ladislaus followed the moving Cumans as far as Szalánkemén (now Stari Slankamen in Serbia), but could not hinder them from crossing the frontier.