According to legend, Erectheus resided atop the Acropolis in his palace. Some myths state that Poseidon killed Erechtheus with his trident, whereas in other versions, it was Zeus who killed Erechtheus with his thunderbolt. After his death the palace was refashioned and used as a temple. Homer records that this was the first temple on the Athenian Acropolis.
Poseidon at that time was trying to gain control of Athens, and challenged Athena to see who had the most to give to the people. Poseidon struck the ground with his trident and a salt water spring flowed from that very spot. Athena also struck the ground with her spear, and miraculously an olive tree sprang up, fully grown and bearing fruit. The olive tree proved to be far more useful than a salt-water spring, and Athena won the contest, but neither she or Poseidon were given the honor of having the temple, which had been built on the site of the contest, named after them. Instead, the temple was named "The Erechtheion"; it also kept its name when, in the 5th century, it was replaced by the temple we see today.
Erechtheus was said to have founded the "Panathenaia", a festival in honor of Athena, when the cult statue of Athena Polias, housed within the Erechtheion, receives a new "peplos" (woolen gown). The sacred snake of Erechtheus was depicted on the inside of the shield which the chryselephantine (gold and ivory) statue of Athena Parthenos held in her hand. The statue was the work of Pheidias the famous Greek sculptor, who also sculpted the great statue of Zeus at the sanctuary of Olympia.
It is also another name for Erichthonius.