William Brooke Stallsmith explains how Hannibal’s amazing string of battlefield successes still ended up meaning little in the larger war between Rome and Carthage:
Hannibal Barca of Carthage was one of history’s most remarkable commanders. In 218 BCE, at the start of the Second Punic War, he led an army of Carthaginian regulars, barbarian allies, and mercenaries — not to mention a few elephants — over the Alps into Italy and over the next few years nearly brought Rome to its knees. Hannibal scored a series of victories, which climaxed at the Battle of Cannae in August 216 BCE, where his 50,000 soldiers enveloped and destroyed nearly twice as many Roman legionnaires, including both consuls of the Roman Republic.
After Cannae, Hannibal controlled nearly all of Italy. Roman military forces on the peninsula were in tatters, and the republic was on the verge of panic. But this great triumph — still studied today as the model for a battle of complete annihilation of the enemy — turned out to be a strategic dead-end. Its aftermath was 15 more years of war and a harsh Roman-dictated settlement that ended centuries of Carthaginian power in the Western Mediterranean.
I think the reasons for Hannibal’s ultimate defeat lay not so much in any failings on his part as in the resilience and flexibility of the Roman Republic. Resilience was built into the nature of the state and the character of its citizens. This fundamental trait made it possible for Rome’s Senate and other institutions to shake off their initial panic and adapt to the new situation created by Cannae. They mobilized the Republic’s manpower and other resources with a ruthless efficiency would have made Albert Speer blink. While new legions were being formed and trained, Roman command in Italy went to a septuagenarian ex-consul, Quintus Fabius Maximus. He refused to engage his limited forces in pitched battle against Hannibal and focused instead on pinprick harassment and the disruption of Carthaginian supply lines.
When the Romans had regained strength and confidence, new adaptations were made. Roman institutions harnessed the energy and lust for glory of an aggressive young commander, Publius Cornelius Scipio Africanus. Scipio led an offensive into the Carthaginian heartland in North Africa and inflicted the final defeats on Hannibal’s army that ended the war on Roman terms.