Mahsa brought Ibn Hamir's head to Amrus in Talavera. However, there was a feud between the Banu Mahsa and the Berbers of Talavera, who killed all the Banu Mahsa. Amrus sent the heads of the Banu Mahsa along with that of Ibn Hamir to Al-Hakam in Cordoba. The Toledo rebellion was sufficiently weakened that Amrus was able to enter Toledo and convince its inhabitants to submit. Collins argues that unassimilated Berber garrisons in al-Andalus engaged in local vendettas and feuds, such as the conflict with the Banu Mahsa. This was due to the limited power of the Umayyad emir's central authority. Collins states that "the Berbers, despite being fellow Muslims, were despised by those who claimed Arab descent". As well as having feuds with Arab factions, the Berbers sometimes had major conflicts with the local communities where they were stationed. In 794, the Berber garrison of Tarragona massacred the inhabitants of the city. Tarragona was uninhabited for seven years until the Frankish conquest of Barcelona led to its reoccupation. Berber groups were involved in the rebellion of Umar ibn Hafsun from 880 to 915. Ibn Hafsun rebelled in 880, was captured, then escaped in 883 to his base in Bobastro. There he formed an alliance with the Banu Rifa' tribe of Berbers, who had a stronghold in Alhama. He then formed alliances with other local Berber clans, taking the towns of Osuna, Estepa, and Ecija in 889. He captured Jaen in 892. He was only defeated in 915 by Abd ar-Rahman III. Throughout the ninth century, the Berber garrisons were one of the main military supports of the Umayyad regime. Although they had caused numerous problems for Abd ar-Rahman I, Collins suggests that by the reign of Al-Hakam the Berber conflicts with Arabs and native Iberians meant that Berbers could only look to the Umayyad regime for support and patronage and developed solid ties of loyalty to the emirs. However, they were also difficult to control, and by the end of the ninth century the Berber frontier garrisons disappear from the sources. Collins says this might be because they migrated back to north Africa or gradually assimilated. In al-Andalus during the Umayyad caliphate New waves of Berber settlers arrived in al-Andalus in the 10th century, brought as mercenaries by Abd ar-Rahman III, who proclaimed himself caliph in 929, to help him in his campaigns to restore Umayyad authority in areas