Greece entered the 4th century under Spartan hegemony, but by 395 BC the Spartan rulers removed Lysander from office, and Sparta lost her naval supremacy. Athens, Argos, Thebes and Corinth, the latter two of which were formerly Spartan allies, challenged Spartan dominance in the Corinthian War, which ended inconclusively in 387 BC. Later, in 371 BC, the Theban generals Epaminondas and Pelopidas won a victory at the Battle of Leuctra. The result of this battle was the end of Spartan supremacy and the establishment of Theban hegemony. Thebes sought to maintain its position until it was finally eclipsed by the rising power of Macedon in 346 BC.