The First Peloponnesian War ended in an arrangement between Sparta and Athens, which was ratified by the Thirty Years' Peace (winter of 446–445 BC). According to the provisions of this peace treaty, both sides maintained the main parts of their empires. Athens continued its domination of the sea while Sparta dominated the land. Megara returned to the Peloponnesian League and Aegina became a tribute-paying but autonomous member of the Delian League. The war between the two leagues restarted in 431 BC, leading to the Second Peloponnesian War. It ended with a conclusive Spartan victory, where, in 404 BC, Athens was occupied by Sparta.