Order 66 was an event at the end of the Clone Wars in which the clone troopers of the Grand Army of the Republic turned against their Jedicommanders and terminated them, bringing about the destruction of the Jedi Order. The event was triggered by Clone Protocol 66, an order implanted into the clones by the Sith Lords and Kaminoan scientists who created the clone army (the latter being tricked by the Sith into thinking that the sole purpose of their hidden «programming» was to install a safeguard against rogue Jedi)[6][7]. The protocol caused clone troopers to violently lash out at the Jedi and view them as traitors, and were controlled by a bio-chipimplanted into the clones during their creation; the chip could control the behavior of the clones and ensure total obedience. The conspiracy, led by Supreme Chancellor Sheev Palpatine—secretly Darth Sidious—and CountDooku, was nearly exposed when the chip belonging to clone trooper CT-5385 malfunctioned, but all who learned of the conspiracy were killed.
In the final days of the Clone Wars, after having revealed himself to the Jedi as the Dark Lord of the Sith, Palpatine issued Order 66. The clone troopers throughout the galaxy turned on the Jedi and began killing them, with numerous Jedi perishing on battlefields across many different worlds. Meanwhile, the fallen Jedi Knight Anakin Skywalker, who had become the Sith Lord Darth Vader, marched on the Jedi Temple with the 501st Legionand killed the Jedi within it. Although most Jedi were wiped out, a small number of Jedi—including Obi-Wan Kenobi, Yoda and Kanan Jarrus—were able to escape, Order 66 marked the destruction of the Jedi, forcing the survivors into exile for over two decades until the defeat of the Sith.