 In 797, the Berbers of Talavera played a major part in defeating a revolt against Al-Hakam I in Toledo.A certain Ubayd Allah ibn Hamir rebelled in Toledo against Al-Hakam.Al-Hakam order Amrus ibn Yusuf to destroy the rebellion.