The city's fortifications were strong, with a wide moat and a thick wall protected by 44 towers, according to the contemporary geographer Ibn Khordadbeh, and the caliph assigned each of his generals to a stretch of the walls. Both besiegers and besieged had many siege engines, and for three days both sides exchanged missile fire while Arab sappers tried to undermine the walls. According to Arab accounts, an Arab prisoner who had converted to Christianity defected back to the caliph, and informed him about a place in the wall which had been badly damaged by heavy rainfall and only hastily and superficially repaired due to the city commander's negligence. As a result, the Arabs concentrated their efforts on this section. The defenders tried to protect the wall by hanging wooden beams to absorb the shock, but they splintered, and after two days a breach was made. The Arabs now launched repeated attacks on the breach, with Afshin, Ashinas, and Itakh taking turns in leading their men in attack, but the defenders held firm. In the event, the city fell by treachery in mid-August, when the Byzantine officer commanding the breach tried to open up separate negotiations with al-Mu'tasim, and the Abbasids used the lull in order to launch a surprise attack.