The Battle of Heraclea was fought in July 280 BC during the Pyrrhic War. Pyrrhus of Epirus' Greek army defeated the Roman legions in a close-fought battle which cost him most of his veteran officers; the victory came at such a high cost that it amounted to a defeat, hence the coining of the term "Pyrrhic victory".
In 281 BC, the Romans attacked Tarentum (modern-day Taranto). The city appealed for help to one of the most experienced war leaders in the Greek world, Pyrrhus of Epirus. The army with which he arrived in southern Italy was typical of the post-Alexander era in the eastern Mediterranean. Most of his troops were spear-wielding infantry, but he also had light and heavy cavalry, several thousand archers, and a score of war elephants.
The Roman consul Publius Valerius Laevinus was sent south with four legions (45,000 troops) to confront Pyrrhus before he could receive reinforcements from his Greek allies. The Romans lured him out by ravaging the countryside, and the two armies met in battle near the Greek city of Heraclea.
The four Roman and four allied legions were drawn up in the traditional manipular fashion, with the young hastati manning the front ranks, more experienced principes filling in behind them, and the veteran triarii standing in reserve. In total, the Romans had around 40,000 legionaries, plus 2,400 Roman and allied cavalry which were placed on the wings and commanded by Consul Laevinus. Meanwhile, Pyrrhus' 25,500-strong infantry force was supplemented by 10,000 Magna Graecian infantry, mercenaries, and cavalry. Pyrrhus' army consisted of 20,000 heavy Phalangites, a few thousand local allies, 5,000 missile troops (including 1,000 Rhodian slingers and Thracian javelinmen), and 4,000 cavalry drawn from the expert horsemen of Thessaly. Pyrrhus held his 20 African war elephants in reserve.
Pyrrhus wished to delay any battle for as long as possible until his allies could rally their forces and join him. He encamped on the left bank of the Siris River, hoping to protect Heraclea on terrain suitable for his phalanx. When his army was resting, Pyrrhus scouted the Roman camp and found that they were no barbarians. A contingent of light infantry missile troops was sent to guard the riverbank, and Pyrrhus turned to other concerns, thinking that he had plenty of time. However, Laevinus ordered an assault across the river after a few hours, and the Roman vanguard was slowed down and pelted by missiles before the deafened Epirote missile infantry were smashed into by Roman cavalry and routed with heavy losses. The Roman velites then crossed the river, so Pyrrhus organized his phalanx and charged ahead of them with 3,000 of his cavalry into the Roman light infantry vanguard. The phalangites then caught up, and the velites pulled back to engage the Epirote cavalry as the hastati joined the battle. Pyrrhus was unhorsed and nearly killed, so he pulled back; his friend Megacles of Epirus donned his armor and his magnificent armor, riding back into the fray. The wall of Greek pikes was fixed, and the Romans were pushed back with their backs to the river. Gradually, the Roman army melted away under the pressure of the phalanx. Everything turned when Megacles was slain by a legionary, and his helmet was paraded around the battle line to inspire the Romans and demoralize the phalangists. The phalanx began to waver, and the Romans pushed the Greeks back to the riverbank. Pyrrhus then charged up and down his line to reveal that he still lived, shoring up their morale. He then unleashed his 20 war elephants into the Roman flanks, terrifying the Roman cavalry and forcing them to retreat into their own infantry, causing them to break formation and run. The Thessalian cavalry chased the Romans along the shore and into the shallows of the river, and 7,000 Romans were killed and 2,000 captured, while the Epirotes lost 4,000, including several veteran officers.