When the Uchiha clan began plotting to stage a coup d’état in the Village of the Hidden Leaf, Itachi was assigned to spy on the Leaf leadership in favor of the Uchiha. After witnessing numerous deaths as a child and realizing that a coup d’état would lead to more deaths, Itachi instead began spying for the Uchiha clan in favor of the Hidden Leaf. When it became clear that war was inevitable, Itachi was ordered to destroy his family. Choosing the lesser of two evils, Itachi turned to Tobi for help in killing the Uchiha clan, which opened the door for Tobi to avenge the Uchis for their betrayal decades earlier. Itachi killed the entire clan, but could not bring himself to kill Sasuke. He asked the Village of Hidden Leaf to protect Sasuke, and he set Sasuke the goal of killing him to atone for what he had done.