 Deciding that he was about to lose, Wadih overthrew al-Mahdi and sent his head to the Berbers, replacing him with Hisham II.However, the Berbers did not end the siege.They methodically destroyed Cordoba's suburbs, pinning the inhabitants inside the old Roman walls and destroying the Madinat al-Zahra.