At the end of the Peloponnesian War (404 BC) Corinth joined Athens in the Corinthian War against Sparta. However, in 395 BC Corinth switched back to the Peloponnesian League and joined Sparta to attack Athens.