In 484 BC the successor of the King of Persia Darius, Xerxes, started the preparations for another huge attack on Greece. As a result, Corinth, Sparta and Athens signed the Anti-Persian Alliance or Hellenic Alliance under the leadership of Sparta.
In 480 BC, the Persians attacked again and defeated Leonidas‘ troops in the first battle in the North of Greece, near Thermopiles, clearing like this their way down to Attica. As soon as they knew it, the Athenians decided to leave their homes and everything behind them to clear the whole region of Attica. They would go to the strait of Salamina to give the decisive battle. The Persian burned down almost all Athens and, what still remained standing, got destroyed on their way back from Boecia. However, in the strait the agile ships from Athens had better cards than the Persians and soon put them on the flight. These returned then to the north of Greece, where they suffered another terrible defeat. The fights in the Plataea plains under the leadership of the Spartan Pausanias went on for some weeks. At the same time, a Greek naval unit defeated the rest of the Persian army in Mycale, the peninsula opposite to Samos, definitively finishing with the Persian danger.
After the victory, the opinion of the members of the Hellenic Alliance were completely different. The Spartans wanted to return to the mainland and to stop their activities in Minor Asia. The Athenians felt really encouraged and offered themselves to protect the cities of Minor Asia. These were the seeds of the future naval alliance of Attica that would be the basis of the great power achieved by Athens in the 5th century BC. In 479/80 BC, the Athenian built a wall around Piraeus and Athens without the approval of Sparta originating the first of the disputes between both cities.