Hannibal (; Punic: 𐤇𐤍𐤁𐤏𐤋, romanized: Ḥanībaʿl; 247 – between 183 and 181 BC) was a Carthaginian general and statesman who commanded the forces of Carthage in their battle against the Roman Republic during the Second Punic War. Hannibal lived during a period of great tension in the Mediterranean Basin, triggered by the emergence of the Roman Republic as a great power with its defeat of Carthage in the First Punic War. Revanchism prevailed in Carthage, symbolized by the pledge that Hannibal made to his father to "never be a friend of Rome".
In 218 BC Hannibal attacked Saguntum (modern Sagunto, Spain), an ally of Rome in Hispania, sparking the Second Punic War. Hannibal invaded Italy by crossing the Alps with North African war elephants. In his first few years in Italy, as the leader of a Carthaginian and partially Celtic army, he won a succession of victories at the Battle of Ticinus, Trebia, Lake Trasimene, and Cannae, inflicting heavy losses on the Romans. Hannibal was distinguished for his ability to determine both his and his opponent's respective strengths and weaknesses, and to plan battles accordingly. His well-planned strategies allowed him to conquer and ally with several Italian cities that were previously allied to Rome. Hannibal occupied most of southern Italy for 15 years. The Romans, led by Fabius Maximus, avoided directly engaging him, instead waging a war of attrition (the Fabian strategy). Carthaginian defeats in Hispania prevented Hannibal from being reinforced, and he was unable to win a decisive victory. A counter-invasion of North Africa, led by the Roman general Scipio Africanus, forced him to return to Carthage. Hannibal was defeated at the Battle of Zama, ending the war in a Roman victory.