The Contest of Athena and Poseidon for Athens
Also called: Contest for Athens, Athena’s olive tree
A legend handed down over the centuries.
A Greek myth told by Herodotus, Apollodorus’ Library and Ovid’s Metamorphoses. Athena and Poseidon competed to be patron of Athens: Poseidon brought forth a salt spring on the Acropolis and Athena an olive tree, and Athena won.

René-Antoine Houasse · Public domain · Source
This Greek myth is told most fully in Apollodorus’ Library and also appears in Herodotus’ Histories and Book 6 of Ovid’s Metamorphoses. In the time of Cecrops, the first king of Attica, Athena and Poseidon each sought to claim the land. Poseidon struck the rock of the Acropolis with his trident and made a salt spring gush forth, while Athena made an olive tree grow. According to Apollodorus the gods (or Cecrops) judged in Athena’s favour, and the angry Poseidon flooded Attica with sea water. The city was named Athens after the goddess.
The historian Herodotus records that the olive tree and the salt spring were in the shrine of Erechtheus on the Acropolis, and that the day after the Persians burned the Acropolis in 480 BC, a shoot a cubit long had sprung from the olive tree. The contest was carved on the west pediment of the Parthenon, and an olive tree still grows beside the Erechtheion today.