In the year 5 ABY, a significant confrontation unfolded within the Imperial Palace on Coruscant. This location, once the sacred Jedi Temple of the esteemed Jedi Order, became the stage for a pivotal duel. The events began with the Sith Lord Leia Organa facing her brother, the Jedi Knight Luke Skywalker. Leia's initial objective was to demonstrate her unwavering allegiance to the dark side of the Force. However, the situation escalated when the Sith Lords Emperor Palpatine and Darth Vader intervened. Palpatine aimed to eliminate the Skywalker twins, while Vader, in a surprising turn, sought to protect them, providing an opportunity for their escape. The duel reached its dramatic conclusion when the Jedi Master Yoda deliberately crashed the Justice Star into the Imperial Palace. This act effectively ended Palpatine's reign and precipitated the definitive collapse of the Galactic Empire.
Leading up to this event, in 0 BBY, the astromech droid R2-D2 successfully obtained the crucial plans for the Galactic Empire's formidable Death Star superweapon. R2-D2 subsequently delivered these plans to the Alliance to Restore the Republic, a feat made possible through the combined efforts of the Force-sensitive Luke Skywalker and the resourceful smugglers Han Solo and Chewbacca. This group also played a vital role in the rescue of Princess Leia Organa, a prominent Rebel leader, from the clutches of the Death Star. Armed with these plans, the Rebels resolved to destroy the Death Star once and for all, preventing it from replicating the devastating Destruction of Alderaan on another planet. The Rebels then embarked in their respective starfighter to confront the Death Star, initiating what would become known as the Battle of Yavin. However, the Rebels did not achieve victory in that initial confrontation. Although Han Solo and his Wookiee companion Chewbacca eventually joined the fray, Skywalker's attempt to destroy the station's primary reactor with his proton torpedoes was unsuccessful, though he did prevent the complete annihilation of Yavin 4. Unable to reconcile with his failure, Skywalker entered hyperspace aboard his X-wing, attached to the Millennium Falcon, Solo's freighter, as Solo recognized the futility of further engagement. Meanwhile, Leia and other Rebels were captured while attempting to flee the Yavin system. While the Rebels were imprisoned on the Death Star, Leia was placed under house arrest within Emperor Palpatine's Imperial Palace, formerly the Jedi Temple of the Jedi Order, with the intention of luring her to the dark side of the Force. Concurrently, following the instructions of his deceased Jedi Master Obi-Wan Kenobi, Skywalker journeyed to Dagobah alongside Solo and Chewbacca to encounter Master Yoda. Yoda trained Luke for five years, while Solo and Chewbacca resumed their smuggling activities, and Darth Vader mentored Leia into the dark side of the Force. During his training, Luke experienced a Force vision in which he killing Leia, though he was unaware of its true significance. By 5 ABY, five years after the failed Battle of Yavin, Skywalker had become a [Jedi Knight](/article/jedi_knight-legends], prepared to confront the Empire, while Leia had risen to the rank of Sith Lord, convincing the ailing Emperor Palpatine to reinstate the Imperial Senate. After departing Dagobah with the Rebels, Yoda remained on the Justice Star to confront Admiral Tarkin with a Force mind trick, while Solo and Skywalker infiltrated the Imperial Palace. After eliminating several Emperor's Royal Guards, they were guided by a reprogrammed C-3PO to the Emperor's throne room, where Palpatine commanded Leia to duel her brother, revealing the truth of their shared parentage. Although Luke initially refused to engage in combat with his sister, C-3PO subdued Solo, and Palpatine threatened to order C-3PO to execute Solo if Skywalker did not fight his Sith apprentice.
Leia immediately initiated the duel against her brother, activating her lightsaber. During the battle, an Imperial officer informed Palpatine that the Justice Star was destroying numerous ships in their fleet, including many Star Destroyers, with its superlaser, purportedly under the command of Admiral Tarkin, who was being manipulated by Yoda to weaken the Empire. Upon receiving this news, Palpatine instructed Darth Vader to contact Admiral Tarkin, but Vader was stunned by the realization that he had a daughter, whispering Leia's name. As the Skywalker siblings clashed, Luke implored his sister to heed her true feelings, leading Leia to conclude that Skywalker was truthful, prompting her to cease the duel. Palpatine, however, declared that her feelings were betraying her and that they had betrayed him, attempting to compel her to continue the fight. Luke asserted that the duel was over and that they were Skywalkers, causing Palpatine to unleash Force lightning upon the two Skywalkers, stating that their lack of strength to be the future had lead the dark side to decide that they would not see the future. Fortunately for the Skywalker twins, Vader leapt from the platform where he stood and knocked off the Emperor, causing him to cease electrocuting his children with Force lightning. Realizing that he was still a Jedi after all, Anakin ordered his children to flee from the Imperial Palace as he restrained the Emperor. Shortly after subduing C-3PO to not have Han killed, the three friends made their way by letting Luke and Leia to slain several stormtroopers. Anakin was quickly defeated by the Emperor, who asked him if his sacrifice would change anything. Nevertheless, Yoda contacted Palpatine to reveal to him that he thought that though maybe his "pitiful powers" weren't enough against the dark side, the dark side hadn't protected the Imperial fleet even though the Imperial troops had disabled the Justice Star's weapons systems. To Palpatine's horror, the last thing he ever saw by his palace's window was the Justice Star, which crashed against the Imperial Palace, effectively killing Sidious, Yoda, R2, Tarkin and Anakin in the process.
Ultimately, Anakin's and Yoda's sacrifices were not in vain. The death of Palpatine lead to the definitive fragmentation of the Galactic Empire once and for all. In addition that both Anakin and Leia were brought back to the light side of the Force, C-3PO's systems returned to normal as all of the Empire's awful programs were definitely purged. Some years later, at Naboo, a ceremony was held for Leia, now the Supreme Chancellor of the New Republic. During the ceremony, Luke was able to see the Force ghosts of Obi-Wan, Yoda and his father Anakin, much to his joy, now that with Leia reformed, they will all bring peace and justice to the galaxy forever.