After recovering from their losses at Trebia (218 BC) and Lake Trasimene (217 BC), the Romans decided to fight Hannibal at Cannae. The Roman army had about 70,000 soldiers. The Romans massed their heavy infantry in a deeper formation than usual. Hannibal attacked using a double-envelopment tactic. This was so successful that the Roman army was destroyed as a fighting force by an army half its size. About 45,500 Roman and allied soldiers were killed. Also killed were 2,700 Roman cavalry. About 17,000 were taken prisoner. Hannibal lost a total of about 4,000 men. Following the defeat, many of Rome's allies changed sides and allied themselves with Carthage.