On Umbara, a firing squad sentenced clone troopers Fives and Jesse to die.
Execution, also known as the death penalty, was a form of punishment where someone found guilty of very serious offenses was put to death. Capital offense generally included treason on worlds that used the death penalty. According to the Yavin Code, prisoners slated for execution had to be blindfolded, but these rules were not commonly followed as the centuries passed.
Jedi Master Prosset Dibs was determined to be guilty of treason early in the Clone Wars because he tried to kill Jedi Master Mace Windu during the operation on Hissrich. Dibs, who believed the Jedi were tyrannical, thought he would be put to death, but Windu instead requested that he undergo rehabilitation.

In the Grand Army of the Republic, mutiny was a court-martial offense that could lead to imprisonment or even death. During the Battle of Umbara, Jedi General Pong Krell had clone troopers Fives and Jesse arrested for not following the orders of their commanding officer, knowing that they would be court-martialed, found guilty, and then executed for treason. However, after Clone Captain Rex attempted to intervene, he gave the order to immediately execute both clones. The captain initially followed Krell's orders because, as a general, he had the power to order executions during wartime. A firing squad was supposed to carry out the execution, but the clones refused. Krell was then taken into custody by his troops for deceiving the 501st Legion and the 212th Attack Battalion into fighting one another. Krell admitted to working with the Umbarans in order to become an apprentice to Count Dooku, and Dogma, his most devoted trooper, executed him for betraying the Galactic Republic.
Later in the conflict, Jedi Order expelled Padawan Ahsoka Tano, and a Republic court tried by a Republic court her for treason and murder. Tano had been framed for the bombing of the Jedi Temple hangar, and Admiral Wilhuff Tarkin, the prosecutor, promised to secure Tano's conviction and pushed for the death penalty for the former Jedi, which shocked her. Barriss Offee, the actual traitor, was exposed before the court could make a decision about Tano. Tano was freed from Republic custody, but she declined the Jedi Order's invitation to rejoin because they had not supported her, with the exception of Anakin Skywalker.
During Anakin Skywalker and Obi-Wan Kenobi's mission to Utapau, General Grievous captured Kenobi and held him as a prisoner aboard Grievous' DH-Omni Support Vessel. Kenobi was being led from his prison cell to the "execution room" by two OOM-series security droids, who told him this. The Jedi Master was surprised and inquired as to whether they had a whole room set aside for carrying out executions. Kenobi then informed the droids that the Yavin Code mandated that all prisoners be blindfolded prior to execution, buying time for Anakin to come and save him.
Quinlan Vos, a Jedi Master, fell to the dark side of the Force after being dispatched to assassinate Count Dooku, the leader of the Separatist. He returned to the Jedi Order after faking reform and engaged in acts of treason. When the Jedi High Council was discussing his proposed punishment, Mace Windu brought up the possibility of execution, which would have been an unprecedented action in the history of the Jedi Order. It was given serious consideration, but ultimately rejected, largely as a result of Obi-Wan Kenobi's arguments. However, following a second betrayal, execution was almost certain, but events eventually worked together to allow Vos to reform.
During its reign, the Galactic Empire frequently used capital punishment for both minor and serious offenses, with many convicts being hanged. Cassian Jeron Andor's adoptive father, Clem Andor, was killed by hanging. When Commandant [Jayhold Beehaz](/article/jayhold_beehaz] learned that his subordinate, Lieutenant Gorn, had joined a rebel infiltration team, he declared that Gorn would be hanged for his treachery. However, Gorn retorted that his years of carrying out Beehaz's orders had earned him a worse punishment.
Zare Leonis, an Imperial cadet, was forced to attend a tribunal in 4 BBY because he was suspected of treason against the Galactic Empire. He admitted guilt to all charges and received a death sentence, but he managed to flee before the penalty could be carried out and carried out a rescue mission to save his sister.
By the secret mission to Tatooine, Doctor Cornelius Evazan had been sentenced to death on twelve star systems, and he shared this information with Luke Skywalker at Chalmun's Spaceport Cantina.

After the Galactic Empire captured Princess Leia Organa while she was transporting stolen Death Star plans to Tatooine, Grand Moff Wilhuff Tarkin issued an execution order for her. Darth Vader, on the other hand, kept her alive so he could torture her for details about the stolen plans and the location of the Rebel Alliance base. Tarkin ordered her immediate execution after learning that she had provided false information indicating that the Rebel base was on Dantooine, but Vader instead decided to let her escape after the Millennium Falcon arrived on the Death Star, believing that she would lead the Empire to the base.
[Jabba Desilijic Tiure](/article/jabba_desilijic_tiure], a crime lord, would feed those who angered him to the sarlacc as a form of execution. Luke Skywalker, Han Solo, and Chewbacca were sentenced to that fate during the Rescue of Han Solo, but they were successful in overpowering the guards who were assigned to carry out their executions.
Similarly, Rebel pilots had orders to kill any Imperials who had worked on the second Death Star.
Following the Galactic Civil War and the New Republic's takeover of the Galactic Empire, some Imperial officials were put to death for war crimes. Gideon, an agent of the Imperial Security Bureau, managed to avoid that execution. However, after Marshal Carasynthia Dune apprehended Gideon on his cruiser, it was stated that the New Republic Tribunal would probably sentence him to death once more for his transgressions.
Pirates frequently used the death penalty, and they were well-known for throwing their convicts out of airlocks. Around 9 ABY, Captain Silvo threw the starship's captain into space after he refused to help the invaders while plundering a New Republic bulk freighter. Silvo was later given a death sentence by airlock by his replacement, Brutus. However, following Chaelt's intervention, Brutus changed the verdict, insisting that the Pirate's Code be upheld by granting the defendant the Right of Last Appeal. Despite temporarily sparing his life, Brutus warned Silvo that he would be executed if At Attin—a remote planet rumored to have an endless supply of Old Republic credits—did not yield any treasure, as the latter had promised.
Senator Ransolm Casterfo supported a campaign to reinstate the death penalty on his homeworld of Riosa in 28 ABY. At the time, more Centrist star systems were supporting it. Ironically, Casterfo was ultimately charged with a capital offense after being set up for the assassination of Tai-Lin Garr. Casterfo was never put to death, and the Resistance eventually saved him.

Within the Stormtrooper Corps of the First Order, traitors were punished by execution. Those in the role of executioner trooper carried out this duty. These specialized stormtroopers were rotated through random duty shifts, rather than having the position held by a single group of people. As a result, any stormtrooper could be given this assignment, but the assignments were kept secret, so no one knew who would be assigned. Finn, a First Order defector previously known as FN-2187, dreaded this task and fervently hoped that his shifts on it would end without him having to carry out any executions. His own defection later caused him and fellow Resistance operative Rose Tico to face this fate, but the two were saved when the Resistance flagship Raddus crashed into the Supremacy, killing their executioners instantly.