Delphi was since ancient times a place of worship for Gaia, the mother goddess connected with fertility. The town started to gain pan-Hellenic relevance as both a shrine and an oracle in the 7th century BC. Initially under the control of Phocaean settlers based in nearby Kirra (currently Itea), Delphi was reclaimed by the Athenians during the First Sacred War (597–585 BC). The conflict resulted in the consolidation of the Amphictyonic League, which had both a military and a religious function revolving around the protection of the Temple of Apollo. This shrine was destroyed by fire in 548 BC and then fell under the control of the Alcmaeonids banned from Athens. In 449–448 BC, the Second Sacred War (fought in the wider context of the First Peloponnesian War between the Peloponnesian League led by Sparta and the Delian-Attic League led by Athens) resulted in the Phocians gaining control of Delphi and the management of the Pythian Games.