Erechtheus was a king of Athens in Greek mythology. He was one of the first kings of the city, and from his name derived the word Erechtheidae, meaning the sons of Erechtheus, which was used to denote an Athenian. His name was also used as an epithet for the god Poseidon, as "Poseidon Erechtheus". "Poseidon Erechtheus" and "Athena Polias" were the two patron saints of Athens, who entered a contest to determine who would be the sole patron saint of the city. As a gift to the citizens of Athens, Poseidon struck a rock on the Acropolis with his trident, creating a salt spring, which was known as the sea of Erechtheus; Athena, instead, gifted them an olive tree and the secret of growing it, and was eventually chosen as the patron saint.
Another Erechtheus, a historical figure who is sometimes conflated with a mythical one, was also a king of Athens, and is distinguished by naming him Erechtheus II. He was the son of King Pandion I of Athens and Zeuxippe, who married Praxithea and had four daughters; Procris, Creusa, Chthonia, Oreithyia. Along with his brother Butes, Erechtheus II co-reigned; Erechtheus took the physical rule of the city, while Butes became the priest of Athena and Poseidon. During his rule, Athens waged war against Eleusis, and an oracle prophesied that Athens would lose unless a daughter of Erechtheus was sacrificed. It is uncertain who was finally sacrificed, but in any case, the remaining sisters committed suicide out of grief. Athens emerged victorious in the war, and Erechtheus killed the Eleusinian leader Eumolpus. In this way, however, the Athenian king drew the wrath of Poseidon, as Eumolpus was the god's son, and Erechtheus was struck down and killed by Poseidon.