Rome and Carthage competed for influence in the Mediterranean, leading to three Punic Wars between the two powers. The First Punic War began as a local conflict in Sicily but resulted in Rome gaining control over Sicily and extracting money from Carthage. Hannibal later invaded Italy by crossing the Alps during the Second Punic War, defeating Roman armies at Cannae, but was unable to take Rome. Rome ultimately defeated Carthage at Zama. Nearly 50 years later, the Third Punic War ended with Rome destroying Carthage to eliminate it as a rival in the Mediterranean.