 In 775 a Berber garrison in Coria declared allegiance to Shaqya, but Abd ar-Rahman retook the town and chased the Berbers into the mountains.In 776 Shaqya resisted sieges to his two main fortresses at Santaver and Shebat'ran (near Toledo).In 777 Shaqya was betrayed and killed by his own followers, who sent his head to Abd ar-Rahman.