As Carthage grew, the relationship with the Numidians blossomed. Carthage's military used the Numidian cavalry as mercenaries. Numidia provided some of the highest quality cavalry of the Second Punic War, and the Numidian cavalry played a key role in a number of battles, both early on in support of Hannibal and later in the war after switching allegiance to the Roman Republic.