At first the raiding did not go well, with Hastein being defeated by the Asturians and later the Muslims of the Umayyad Caliphate of Córdoba at Niebla in 859. Success followed with the sacking of Algeciras, where the mosque was burned, and then the ravaging of Mazimma in the Idrisid Caliphate on the north coast of Africa, followed by further raids into the Umayyad Caliphate at Orihuela, the Balearic Islands and Roussillon. They occupied Nekor for 8 days.