 Abd ar-Rahman sent out armies to fight him in 769, 770, and 771, but Shaqya avoided them by moving into the mountains.In 772, Shaqya defeated an Umayyad force and killed the governor of the fortress of Medellin by a ruse.He was besieged by Umayyads in 774, but the revolt near Seville forced the besieging troops to withdraw.