The decades after the end of the Peloponnesian War were turbulent ones. The chief states — Sparta, Athens, and Thebes — each tried to create a political system in which it would dominate. When Athens surrendered to Sparta in 404 B.C.E., the Spartans used their victory to build an empire. Their decision brought them into conflict with Persia, which now demanded the return of Ionia to its control, as Sparta had promised earlier. From 400 to 386 B.C.E., the Spartans fought the Persians for Ionia, a conflict that eventually engulfed Greece itself. After years of stalemate the Spartans made peace with Persia and their own Greek enemies. The result was a treaty, the King’s Peace of 386 B.C.E., in which the Greeks and Persians pledged themselves to live in harmony. This agreement cost Sparta its empire but not its position of dominance in Greece.
The Spartans were not long content with this situation, however, and decided to punish cities that had opposed Sparta during the war. In 378 B.C.E., the Spartans launched an unprovoked attack on Athens. Together the Thebans and the Athenians created what was called the Second Athenian Confederacy, a federation of states to guarantee the terms of the peace treaty. The two fought Sparta until 371 B.C.E., when, due to growing fear of Theban might, Athens made a separate peace with Sparta. Left alone, Thebes defended itself until later that year, when the Thebans routed the Spartan army on the small plain of Leuctra and, in a series of invasions, eliminated Sparta as a major power.