After midday, the grenadiers together with the cavalry, gradually began to gather on a small hill, where the only fountain to be seen, around lay, and from where the Spanish troops had formed and taken control, and which the moors wanted to take hold.[3] The Duke of Montemar ordered a small fort to be built to ensure communication with the fleet.[3] A company of fusiliers was set up to protect the workers on the Fort, but they were under continual attack from the large number of Ottoman-Algerian troops, and finally, due to lack of ammunition, they began to retreat. This retreat gave the moors heart and they cautiosly advanced.[3] Montemar, noticing this, sent 16 companies of infantry under the command of Don Alejandro de la Motte, and 4 squadrons of Spanish Dragoons to attack the front line of Muslim troops.[3] The onslaught by the cavalry and infantry was so energetic, that they caused many casualties in the enemy, and forced the Moorish troops to retreat to another distant mountain amid the great confusion.[3] Counting Janissaries, Moors and Turks, they came to about 20,000 to 22,000 men in total.[3]