You could use it to your advantage- pick up some merc phalanxes, post them inside the gate and wait for teh spaniards to impale themselves on spikes as they all surge through the gates.