 The fort city under Spanish rule continued to grow, requiring enlargement of the city walls.In spite of the improved fortifications, the city was the object of repeated attacks.Notable in this regard was when Moroccan Sharif Moulay Ismail tried to force his way past the defenses in 1707, only to see his army decimated.