The Second Punic War (218 to 201 BC) was the second of three wars fought between Carthage and Rome, the two main powers of the western Mediterranean in the 3rd century BC. For 17 years the two states struggled for supremacy, primarily in Italy and Iberia, but also on the islands of Sicily and Sardinia and, towards the end of the war, in North Africa. After immense materiel and human losses on both sides, the Carthaginians were defeated. Macedonia, Syracuse and several Numidian kingdoms were drawn into the fighting, and Iberian and Gallic forces fought on both sides. There were three main military theatres during the war: Italy, where Hannibal defeated the Roman legions repeatedly, with occasional subsidiary campaigns in Sicily, Sardinia and Greece; Iberia, where Hasdrubal, a younger brother of Hannibal, defended the Carthaginian colonial cities with mixed success before moving into Italy; and Africa, where Rome finally won the war.
The First Punic War had ended in a Roman victory in 241BC after 23 years and enormous losses on both sides. After the war Carthage expanded its holdings in Iberia where in 219BC a Carthaginian army under Hannibal besieged, captured and sacked the pro-Roman city of Saguntum. In early 218BC Rome declared war on Carthage, beginning the Second Punic War. Later that year, Hannibal surprised the Romans by marching his army overland from Iberia, through Gaul and over the Alps to Cisalpine Gaul (modern northern Italy). Reinforced by Gallic allies he obtained crushing victories over the Romans at the battles of Trebia (218) and Lake Trasimene (217). Moving to southern Italy in 216 Hannibal defeated the Romans again at the battle of Cannae, where he annihilated the largest army the Romans had ever assembled. After the death or capture of more than 120,000 Roman troops in less than three years, many of Rome's Italian allies, notably Capua, defected to Carthage, giving Hannibal control over much of southern Italy. As Syracuse and Macedonia joined the Carthaginian side after Cannae, the conflict spread.