Al-Muktafi also kept up the perennial conflict with the Byzantine Empire, with varying success. In May 902, al-Qasim ibn Sima al-Farghani was appointed to command of the frontier districts of the Jazira. In 902 or 903, a naval raid reached the island of Lemnos, dangerously close to the Byzantine capital, Constantinople; the island was plundered and its inhabitants carried off into slavery. Nevertheless, in May 903, the newly appointed governor of Tarsus, Abu'l-Asha'ir Ahmad ibn Nasr, was dispatched to the frontier districts with gifts for the Byzantine ruler, Leo VI the Wise (), and in return, Byzantine envoys arrived in Baghdad for negotiations on a prisoner exchange. The exchange eventually took place in September–October 905, at the river Lamus in Cilicia, but was interrupted because the Byzantines reneged on the agreed terms. After further negotiations, the exchange was completed in August 908.