The Theban–Spartan War of 378–362 BC was a series of military conflicts fought between Sparta and Thebes for hegemony over Greece. In 378 BC, led by General Epaminondas, Thebes revolted against its Spartan garrison and successfully repelled Spartan offensives. A clever tactician, Epaminondas crushed the hitherto invincible Spartan army at Leuctra in 371 BC, therefore ending Sparta's hegemony and starting Thebes' own hegemony over Greece. After Leuctra, the war continued in the Peloponnese, where Sparta was fighting for survival. In 362 BC, the Battle of Mantinea was a new victory for Thebes, but Epaminondas was also killed. The conflict ended soon after with a treaty of general peace signed by all the belligerents, except Sparta, which was by now isolated and permanently weakened.