Carthage's defeat in the First Punic War meant the loss of Carthaginian Sicily to Rome under the terms of the Roman-dictated 241 BC Treaty of Lutatius. Rome exploited Carthage's distraction during the Truceless War against rebellious mercenaries and Libyan subjects to break the peace treaty and annex Carthaginian Sardinia and Corsica to Rome in 238 BC. Under the leadership of Hamilcar Barca and his family, Carthage defeated the rebels and began the Barcid conquest of Hispania from 237 BC onward. Control over Spain gave Carthage the silver mines, agricultural wealth, manpower, military facilities such as shipyards and territorial depth to stand up to future Roman demands with confidence.
The Second Punic War was ignited by the dispute over the hegemony of Saguntum, a Hellenized Iberian coastal city with diplomatic contacts with Rome. After great tension within the city government, culminating in the assassination of the supporters of Carthage, Hannibal laid siege to the city of Saguntum in 219 BC. The city called for Roman aid, but the pleas fell on deaf ears. Following a prolonged siege of eight months and a bloody struggle, in which Hannibal himself was wounded, the Carthaginians finally took control of the city. Many of the Saguntians chose to commit suicide rather than face subjugation by the Carthaginians. The loss of Saguntum as a potential base of operations in Carthaginian Iberia was a serious setback to the main Roman strategic objective in Spain: the eviction of the Carthaginians from the peninsula. The Roman Senate sent an embassy to the Carthaginian Senate that declared war on Carthage in early 218 BC over the attack on Rome's Saguntine ally.
Before the war, Rome and Hasdrubal the Fair had made a treaty. Livy reports that it was agreed that the Iber should be the boundary between the two empires and that the liberty of the Saguntines should be preserved.:21.13
Carthaginian strategy and aims
The highest priority in Carthaginian strategy was to keep the war away from Carthage's agricultural heartland in Africa and protect the property of the wealthy Carthaginian landowners who controlled Carthaginian politics. Spanish mines and sources of manpower comprised the second pillar of the Carthaginian power base and their protection was essential to maintaining Carthage's status as an independent continental great power. Hannibal's invasion of Italy forced the Romans to abandon their intended invasion of Africa and de-prioritize the reinforcement of Roman armies in Spain. Most Roman troops during the war fought in Italy, which became the main theater of the war as a result of Hannibal's offensive. Africa remained undisturbed by a Roman invasion army until 204 BC and the Roman military presence in Spain was confined to its northeastern corner until 209 BC. The continuation of Carthaginian rule in Africa and Spain enabled her to mobilize more armies and fleets, attempt the reconquest of Sicily and Sardinia from 215 to 210 BC and invade Italy with Hasdrubal Barca's army in 208 BC and with Mago Barca's forces from 205 to 203 BC.
To win the war, Hannibal in Italy sought to build up a united front of the northern Italian Gallic tribes and south Italian city states to encircle Rome and confine it to central Italy, where it would pose a lesser threat to Carthage's power-political freedom of action. A Carthaginian protectorate over Italy would be created, enforced by the presence of Carthaginian soldier colonists and the Carthaginian annexation of parts of Italy. This would act as a check on Roman revanchism. Sicily and Sardinia were also to be regained for Carthage by sending expeditionary forces and allying with anti-Roman rebels on both islands.