Electra was written towards Sophocles last years. Although an exact date can not be established, specialists usually consider that the tragedy was written around 409 B.C. 

The play constructs another powerful character – Electra. The subject was very popular to ancient literature. 

The events are presented in the Odyssey, but the story appears in the work of all three great tragedians- Aeschylus, Sophocles, and Euripides. 

Because both the date of Sophocles' Electra and Euripides' are uncertain, one of the debates of the critics was which play influenced the other, without leading to an exact answer. 

Sophocles follows the main lines of Aeschylus' Choephoroe and bases his play on a very popular story for Greek audiences, the legend of the House of Atreus. 

Some of the things important to the story take place before the first line of the play

King Agamemnon returns from the Trojan War with a new concubine, Cassandra. During the war, his wife, Clytemnestra, has taken Agamemnon's cousin Aegisthus to be her lover. 

Cassandra kills the king and his concubine, believing the adultery was justified, since Agamemnon had sacrificed their daughter Iphigeneia before the war, for the gods commanded this way. 

Electra, the daughter of Agamemnon and Clytemnestra, manages to rescue her infant brother Orestes from her mother, by sending him to Strophius of Phocis. 

The tragedy begins, years later, with Orestes returning for revenge. Orestes arrives together with his friend Pylades, son of Strophius and his tutor. Their plan is to announce Orestes has died in a chariot accident, and to deceive everybody he and his friend are just two men delivering the urn with remains.

Electra continues hoping one day her brother will return for revenge and she is devastated when she hears the news of his death. 

On the contrary, Clytemnestra is relieved to hear it. Orestes arrives with the urn but he does not recognize Electra, nor she recognizes him.

He gives her the urn, realizes who she is and reveals his identity to his sister. She is overwhelmed that her brother is alive. 

Orestes and Pylades enter the house and kill Clytemnestra. When Aegisthus returns home, they present her corpse, covered in a sheet as being the body of Orestes. He lifts the veil and discovers Clytemnestra’s body. 

Orestes also reveals himself and decides Aegisthus should be slain in the same location where Agamemnon was killed. The play ends here, before the death of Aegisthus is announced.