The battle of Leuctra (371 BC) was the first major defeat suffered by the main Spartan hoplite army, and played a major part in the collapse of Spartan power after their triumph in the Great Peloponnesian War.
In 379 Epaminondas helped lead a revolt that expelled a Spartan garrison from Thebes (Theban-Spartan War, 379-371). A series of Spartan invasions of Boeotia failed, although Spartan armies did get close to Thebes in 378 and 377. The campaign of 376 failed to even reach Boeotia, and in the same year the Spartan fleet was defeated at Naxos. In 375 the Spartans suffered another naval defeat at Alyzeia, and an embarrassing defeat on land at Tegyra, with a force of 1,000 Spartan hoplites was defeated by a Theban force half its size. These defeats were followed by a short period of peace, but by 373 the fighting had resumed. A Spartan attempt to seize Corcyra failed after the besieging army was defeated in battle between the city and its camp. The Thebans took advantage of the resumption of the war to attack their enemies in Boeotia. Plataea was captured and the city destroyed, and the walls of Thespiae were pulled down. This angered Thebe's Athenian allies, and peace negotiations began once again.
These negotiations involved Sparta, Athens, Thebes and their allies. They produced a fairly typical agreement for the period, in which each side agreed to remove their governors and garrisons from other cities and allow every Greek polis to enjoy autonomy. This last clause caused the partial failure of the negotiations. According to Xenophon, on the day after the treaty was agreed the Thebans wanted it changed so that they could sign on behalf of the Boeotian Confederacy. Agesilaus II of Sparta refused to agree to this, and struck Thebes's name off the treaty. The Spartans then demanded that Thebes allow the cities of the Boeotian Confederacy their autonomy (conveniently ignoring their own dominance of the Peloponnesian League). Thebes refused to accept this new demand, and as a result the second Spartan king, Cleombrotus, was ordered to invade Boeotia from the west, using troops already available in Phocis.
Cleombrotus invaded Boeotia at the head of 10,000 Spartan and allied hoplites and 1,000 cavalry. The Thebans blocked most of the routes into Boeotia, but Cleombrotus found a way across Mt Helicon (in the south-western part of Boeotia). After crossing the mountain he defeated the Theban force defending Helicon, then turned south to capture the port of Creusis. From there he moved inland to Leuctra, south-east of Thespiae, and took up a position on a ridge.
The Thebans had a smaller army, of around 6,000 hoplites and an unknown amount of cavalry. The Spartan infantry had a fearsome reputation at this point, having never yet lost a major open battle. The Thebans were also outnumbered, and some of their leaders appear to have wanted to avoid a battle. The pro-battle faction was lead by Epaminondas, who was then serving as one of the Boeotarchs, and Pelopidas, the leader of the Theban Sacred Band. They were able to convince the army to risk a battle.
Epaminondas decided to attempt a novel tactic during the battle. The standard formation for a Greek hoplite army was a fairly even line, with the command on the right. Often both right wings would win their fight, and the battle would be decided by who reacted best after that. Epaminondas decided to try and knock out the Spartan right. He posted his best men on his left instead of on the right, and formed them into a 50 deep formation.
On the morning of the battle some of the Boeotians left their camp. This may have been non-combatants, leaving before the battle, or as later accounts suggest, the more reluctant soldiers, given permission to leave by Epaminondas. In either case Cleombrotus sent some of his cavalry and peltasts to attack these men, forcing them back into the main Boeotian camp.
Both armies spent the night before the battle in camps on ridges on opposite sides of a valley. On the morning of the battle both armies advanced into the plains. Cleombrotus posted his 2,000 Lacedaemonians on his right, with the allied troops in the centre and on the left. The Thebans posted their Sacred Band on their left. Both sides posted their cavalry in front of their main lines, with the Spartans probably doing this first and the Thebans reacting to it.
The battle began with a cavalry clash, in which the Thebans were victorious. The retreating Spartan army disrupted the main Spartan line just as the fast moving fifty deep Theban left attacked. The Thebans headed straight for King Cleombrotus, who was mortally wounded. He was taken alive from the battlefield, and the Spartan right may have held on for a little longer after this, but their leaders continued to be killed. Amongst the dead were Deinon, one of the Polemarchs, Sphodrias, one of Cleombrotus's close companions, and Cleonymus, son of Sphodrias. The Spartan right eventually broke and began to retreat towards their camp. This inevitably led to a similar collapse on the left, where the sight of the invincible Spartans retreating in disarray must have been very alarming. There doesn't appear to have been any combat on this flank of the battle, with the fighting restricted to the Spartan right/ Theban left. Epaminondas is said to have deployed his right wing in echelon, so that they were further away from the straight Spartan line than the powerful Theban left.
Plutarch gives a slightly different account, in which Pelopidas moved his 50 deep column further to the left, in order to pull the Spartans away from their allies. The Spartans attempted to use their superior numbers to surround the Thebans, but were hit by the Theban Sacred Band while they were in the middle of a change of formation.
The exact role of the Sacred Band is unclear. They were posted on the Theban left, where they may have formed the first five or six ranks of the fifty deep column, six full 50-man columns, been posted further to the left in the normal twelve deep formation, or even been in reserve ready for the right moment to attack.
The retreating Spartans managed to regain the safety of their camp, but they admitted their defeat by asking for a burial truce to retrieve the bodies of the slain. Xenophon gives casualty figures of 1,000 dead, including 400 of the 700 full Spartiates. The two sides watched each other for a few days from their camps. The Thebans received reinforcements under Prince Jason of Pherae, who was able to negotiate a Spartan withdrawal. Just outside Boeotia the retreating Spartans found their own reinforcements, a levy of just about every fighting man left in Sparta, under the command of Prince Archidamus, the son of Agesilaus II. Having successfully rescued the survivors of the battle, Archidamus decided not to risk another invasion of Boeotia, disbanded his army and returned to Sparta.
The battle of Leuctra ended the period of Spartan dominance in Greece. In the aftermath the Boeotian League was strengthened, more states joined the Second Athenian League, while the Peloponnesian League collapsed. Epaminondas led a series of campaigns in the Peloponnese that greatly weakened Spartan power, freeing many of their captive communities. The Theban hegemony didn't last for long - Epaminondas was killed in battle in 362 and with him gone, Theban power collapsed.