The city had been poorly manned and provisioned by the Portuguese. Reinforcements were too sporadic. At one point a barrel of powder exploded which opened a gaping hole in the city's defenses.[5] The Portuguese had also lost local support following the assassination of their allies Yahia u-Ta'fuft of Safi in 1518, and Malik ibn Mawud of Agadir in 1521.[5]