After the battle of the Metaurus, the chief interest of the war was transferred to Spain and Africa. The Roman armies were led by a youthful hero, perhaps the greatest man that Rome ever produced, with the exception of Julius Cæsar. The remaining period of the war is little more than the history of P. Scipio. This extraordinary man was the son of P. Scipio, who fell in Spain in B.C. 212, as already related. In his early years he acquired, to an extraordinary extent, the confidence and admiration of his countrymen. His enthusiastic mind led him to believe that he was a special favorite of heaven; and he never engaged in any public or private business without first going to the Capitol, where he sat some time alone, enjoying communion with the gods. For all he proposed or executed he alleged the divine approval: he believed himself in the revelations which he asserted had been vouchsafed to him; and the extraordinary success which attended all his enterprises deepened this belief.

P. Scipio is first mentioned in B.C. 218 at the battle of the Ticinus, where he is reported to have saved the life of his father, though he was then only 17 years of age. He fought at Cannæ two years afterward (B.C. 216), when he was already a tribune of the soldiers, and was one of the few Roman officers who survived that fatal day. He was chosen along with Appius Claudius to command the remains of the army, which had taken refuge at Canusium; and it was owing to his youthful heroism and presence of mind that the Roman nobles, who had thought of leaving Italy in despair, were prevented from carrying their rash project into effect. He had already gained the favor of the people to such an extent that he was unanimously elected Ædile in B.C. 212. On this occasion he gave indications of the proud spirit, and of the disregard of all the forms of law, which distinguished him throughout life; for when the tribunes objected to the election, because he was not of the legal age, he haughtily replied, "If all the Quirites wish to make me Ædile, I am old enough." After the death of Scipio's father and uncle, C. Nero was sent out as Proprætor to supply their place; but shortly afterward the Senate resolved to increase the army in Spain, and to place it under the command of a Proconsul to be elected by the people. But when they were assembled for this purpose, none of the generals of experience ventured to apply for so dangerous a command. At length Scipio, who was then barely twenty-four, to the surprise of every one, offered himself as a candidate. But the confidence which he felt in himself he communicated to the people, and he was accordingly chosen with enthusiasm to take the command.

Scipio arrived in Spain in the summer of B.C. 210. He found that the three Carthaginian generals, Hasdrubal, son of Barca, Hasdrubal, son of Gisco, and Mago, were not on good terms, and were at the time engaged in separate enterprises in distant parts of the peninsula. Instead of attacking any of them singly, he formed the project of striking a deadly blow at the Carthaginian power by a sudden and unexpected attack upon New Carthage. He gave the command of the fleet to his intimate friend Lælius, to whom alone he intrusted the secret of the expedition, while he led the land-forces by extremely rapid marches against the city. The project was crowned with complete success. The Carthaginian garrison did not amount to more than a thousand men, and before any succor could arrive New Carthage was taken by assault. The hostages who had been given by the various Spanish tribes to the Carthaginians had been placed for security in the city. These now fell into the hands of Scipio, who treated them with kindness; and the hostages of those people who declared themselves in favor of the Romans were restored without ransom. Scipio also found in New Carthage magazines of arms, corn, and other necessaries, for the Carthaginians had there deposited their principal stores.

The immediate effects of this brilliant success were immense. Many of the Spanish tribes deserted the Carthaginian cause; and when Scipio took the field in the following year (B.C. 209) Mandonius and Indibilis, two of the most powerful and hitherto the most faithful supporters of Carthage, quitted the camp of Hasdrubal Barca, and awaited the arrival of the Roman commander. Hasdrubal was encamped in a strong position near the town of Bæcula, in the upper valley of the Bætis (Guadalquiver), where he was attacked and defeated by Scipio. He succeeded, however, in making good his retreat, and retired into northern Spain. He subsequently crossed the Pyrenees, and marched into Italy to the assistance of his brother Hannibal, as already narrated.

In B.C. 207 Scipio gained possession of nearly the whole of Spain, by a decisive victory near a place variously called Silpia or Elinga, but the position of which is quite uncertain.

Hasdrubal, son of Gisco, and Mago, took refuge within the walls of Gades, which was almost the only place that now belonged to the Carthaginians; and all the native chiefs hastened to acknowledge the supremacy of Rome. But the victories of Scipio had had but a small share in winning Spain. His personal influence had won far more people than his arms had conquered. He had gained such an ascendency over the Spaniards by his humanity and courage, his courtesy and energy, that they were ready to lay down their lives for him, and wished to make him their king.

The subjugation of Spain was regarded by Scipio as only a means to an end. He had formed the project of transferring the war to Africa, and thus compelling the Carthaginians to recall Hannibal from Italy. He therefore resolved, before returning to Rome, to cross over into Africa, and secure, if possible, the friendship and co-operation of some of the native princes. His personal influence had already secured the attachment of Masinissa, the son of the king of the Massylians, or Western Numidians, who was serving in the Carthaginian army in Spain; and he trusted that the same personal ascendency might gain the more powerful support of Syphax, the king of the Massæsylians, or Eastern Numidians. With only two quinqueremes he ventured to leave his province and repair to the court of Syphax. There he met his old adversary, Hasdrubal, son of Gisco, who had crossed over from Gades for the same purpose; and the two generals spent several days together in friendly intercourse. Scipio made a great impression upon Syphax; but the charms of Sophonisba, the daughter of Hasdrubal, whom the latter offered in marriage to Syphax, prevailed over the influence of Scipio. Syphax married her, and from that time became the zealous supporter and ally of the Carthaginians.

During Scipio's absence in Africa a formidable insurrection had broken out in Spain; but on his return it was speedily put down, and terrible vengeance was inflicted upon the town of Illiturgis, which had taken the principal share in the revolt. Scarcely had this danger passed away when Scipio was seized with a dangerous illness. Eight thousand of the Roman soldiers, discontented with not having received their usual pay, availed themselves of this opportunity to break out into open mutiny; but Scipio quelled it with his usual promptitude and energy. He crushed the last remains of the insurrection in Spain; and to crown his other successes, Gades at last surrendered to the Romans. Mago had quitted Spain, and crossed over into Liguria, to effect a diversion in favor of his brother Hannibal, and there was therefore now no longer any enemy left in Spain.

Scipio returned to Rome in B.C. 206, and immediately offered himself as a candidate for the consulship. He was elected for the following year (B.C. 205) by the unanimous votes of all the centuries, although he had not yet filled the office of Prætor, and was only 30 years of age. His colleague was P. Licinius Crassus, the Pontifex Maximus, who could not, therefore, leave Italy. Consequently, if the war was to be carried on abroad, the conduct of it must of necessity devolve upon Scipio. The latter was anxious to land at once in Africa, and bring the contest to an end at the gates of Carthage; but the older members of the Senate, and among them Q. Fabius Maximus, opposed the project, partly through timidity and partly through jealousy of the youthful conqueror. All that Scipio could obtain was the province of Sicily, with permission to invade Africa if he should think it for the advantage of the Republic; but the Senate resolutely refused him an army, thus making the permission of no practical use. The allies had a truer view of the interests of Italy than the Roman Senate; from all the towns of Italy volunteers flocked to join the standard of the youthful hero. The Senate could not refuse to allow him to enlist these volunteers; and such was the enthusiasm in his favor that he was able to cross over to Sicily with an army and a fleet, contrary to the expectations and even the wishes of the Senate. While busy with preparations in Sicily, he sent over Lælius to Africa with a small fleet to concert a plan of co-operation with Masinissa. But meantime his enemies at Rome had nearly succeeded in depriving him of his command. Although he had no authority in Lower Italy, he had assisted in the reduction of Locri, and after the conquest of the town had left Q. Pleminius in command. The latter had been guilty of such acts of excesses against the inhabitants, that they sent an embassy to Rome to complain of his conduct. Q. Fabius Maximus eagerly availed himself of the opportunity to inveigh in general against the conduct of Scipio, and to urge his immediate recall. Scipio's magnificent style of living, and his love of Greek literature and art, were denounced by his enemies as dangerous innovations upon old Roman manners and frugality. It was asserted that the time which ought to be given to the exercise and the training of his troops was wasted in the Greek gymnasia or in literary pursuits. Though the Senate lent a willing ear to these attacks, they did not venture upon his immediate recall, but sent a commission into Sicily to inquire into the state of the army. During the winter Scipio had been busy in completing his preparations; and by this time he had collected all his stores, and brought his army and navy into the most efficient state. The commissioners were astonished at what they saw. Instead of ordering him to return to Rome, they bade him cross over to Africa as soon as possible.

Accordingly, in B.C. 204, Scipio, who was now Proconsul, sailed from Lilybæum and landed in Africa, not far from Utica. He was immediately joined by Masinissa, who rendered him the most important services in the war. He commenced the campaign by laying siege to Utica, and took up his quarters on a projecting headland to the east of the town, on a spot which long bore the name of the Cornelian Camp. Meantime the Carthaginians had collected a powerful army, which they placed under the command of Hasdrubal, son of Cisco, Scipio's old opponent in Spain; and Syphax came to their assistance with a great force.