In the spring, the Carthaginians launched an offensive in an attempt to reestablish their dominance over the
Iberian Peninsula. Mago was joined at Ilipa by Hasdrubal Gisco, and together they assembled an army larger than that of the Romans. Mago boldly attacked the Roman camp with the majority of his cavalry, comprising King Massinissa's Numidian horsemen. However, the assault was thwarted by the
Roman cavalry, which charged the flank of the enemy, inflicting significant losses. In the following days, the generals chose to face and observe each other without engaging in full battle. Each day, both armies lined up on the field in the same formation:
Scipio placed the legionaries in the center with
Iberians on the flanks, backed by cavalry, and stationed the
Velites in front of the legionaries, as usual. Meanwhile, the Carthaginians mirrored the Roman formation, positioning elite African infantry in the center (intended to confront the
Roman legionaries), with Iberians and cavalry on the flanks (who would face their Roman counterparts), and light infantry in the center front, positioned before the Africans, with elephants at the forefront of the cavalry. This continued for several days until Scipio decided to take the initiative and attack the enemy: he prepared his troops overnight, and at dawn, he sent the Velites and cavalry to raid the enemy camp. The
Carthaginian army emerged on the battlefield in complete disorder, as their soldiers had been caught off guard and were unprepared to fight (many were still asleep). Hasdrubal and Mago positioned their troops as in previous days, but this repetition proved costly.
Scipio, in fact, had changed his formation, placing the
legionaries on the flanks and the allied
Iberians in the center. The Velites were maneuvered along the line, positioned between the legionaries and cavalry, tasked with handling the enemy's elephants. The two armies finally engaged, with clashes between the cavalries, Roman legionaries fighting the Iberians in the Carthaginian forces, and the Velites confronting the elephants. However, as predicted by the young Scipio, the central forces of the two armies did not engage directly. The Roman proconsul had deliberately pulled back his Iberian allies. The skill of the legionaries allowed them to overcome Hasdrubal and Mago's soldiers, while the Velites used javelins and trumpets to drive the elephants into a frenzy, causing them to trample much of the Carthaginian cavalry. As a result, the African soldiers, unable to assist their comrades (as doing so would have left the center completely exposed, effectively dividing their formation and allowing Scipio's Iberians to outflank and attack them from the sides and rear), grew demoralized. The rest of the
Carthaginian army, seeing that even their best troops had lost hope, began to flee with them in an initially orderly retreat. However, when the Roman general ordered his Iberian soldiers to pursue the enemies, their retreat turned into a full rout. The Carthaginian army was virtually annihilated, and the few survivors surrendered shortly after. Hasdrubal and Mago managed to escape and took refuge in Gades. ==After-battle maneuvers==