Skirmish on Naboo / Legends A skirmish took place on the planet Naboo during the Clone Wars between the Galactic Republic and the Confederacy of Independent Systems . Prelude . During the Clone Wars , Count Dooku used Rish Loo ' s secret laboratory as a hidden base on the planet Naboo , which had been invaded by the Trade Federation cartel over a decade prior . In 21 BBY , the second year of the war , Dooku conspired with General Grievous and Rish Loo to launch another invasion of the planet , a plot that would involve turning the Gungans and the Gungan Grand Army against the Naboo people . When Minister Rish Loo began influencing Boss Lyonie , the leader of the Gungan community Otoh Gunga , to behave strangely and call for a Gungan alliance with the Separatists and an attack on Theed , Representative Jar Jar Binks invited his allies , Senator Padmé Amidala and Jedi Knight Anakin Skywalker , to help in the investigation into Lyonie ' s actions . After arriving on Naboo , Skywalker and Amidala learned that Rish Loo was using a hypnotic necklace to control Lyonie ' s brain . Anakin destroyed the necklace , bringing Lyonie back to his senses and causing him to regret declaring an attack on the Naboo . Upon being discovered , Rish Loo stabbed Lyonie in an attempt to kill him and fled Otoh Gunga . While Lyonie was recovering , Padmé and Anakin noticed that Jar - Jar shared an uncanny resemblance to Lyonie , so they made Jar - Jar disguise as Lyonie to stop the invasion . The skirmish . Rish Loo went to the assembled Gungan Grand Army and told them that Lyonie was dead , ordering them to attack Naboo immediately . Jar - Jar showed up at that moment , posing as Lyonie . He denounced Rish Loo , who fled to his laboratory . Anakin followed Rish Loo , fighting the probe droids Rish Loo sent to stop him . Meanwhile , Grievous and his army landed on Naboo aboard C - 9979 landing craft . The tactical droid commander informed Jar - Jar that Grievous wanted to know why the attack on Theed was cancelled . Jar - Jar entered Grievous ' s lander and negotiated with the general . Meanwhile , Padmé contacted Tarpals and told him to take advantage of the alliance with the Separatists and shut down the droids while they weren ' t expecting it . Grievous figured out that Jar - Jar was not Lyonie , so he chased the gungan outside , where he found his entire army deactivated . As it began to rain , the gungan army surrounded Grievous and told him to surrender . Grievous scoffed at both the very idea and the Gungans resistance before drawing two lightsabers . He managed to deflect several boomas , but was disarmed of his green - bladed lightsaber by another . Several Gungan warriors attacked him , with two dying in the process before Tarpals attcaked him with an electric spear . In spite of his experience , the seasoned Gungan general was no match for Grievous , who stabbed him with a spear he had taken from a fallen Gungan . As he was dying , Tarpals used his final gasp of energy to drive his spear into Grievous ' s armor . As electricity surged through Grievous , the other gungan warriors threw boombas at Grievous , disabling his cyborg body and knocking him down . He was then taken prisoner , though Tarpals had already died before any aid could be given . Capture of Skywalker . Skywalker , meanwhile , found Dooku ' s lair , after following Rish Loo to the ancient structure . Little did Skywalker know , however , that , in the wake of Grievous ' capture , Dooku was looking to capture Skywalker so as to force a hostage trade between the opposing factions . When Rish Loo approached Dooku and began to speak of their ongoing plans , Dooku denounced Loo as a " fool , " before abruptly stabbing him with his lightsaber , just as Anakin arrived in the chamber . Dooku and Anakin then briefly had a heated discussion regarding the invasion , in which Dooku revealed that the Sith were not only behind the current invasion , but had orchestrated the first invasion as well . Dooku then engaged in a duel with Anakin , with the latter gaining the upper hand . Dooku broke off Anakin ' s attack by barraging him with lamps . While Anakin managed to deflect this barrage , he quickly found himself overwhelmed by Dooku ' s attending MagnaGuards . Forced to battle the MagnaGuards along with Dooku , Skywalker became incapacitated by several electric shocks , to which he used a Force Wave to knock back the Magnaguards . Surprised , Dooku then assaulted Skywalker with a Force choke , followed up by Force Lightning . Skywalker was subdued and captured . Prisoner exchange . Shortly following the captures of Grievous and Skywalker , Padmé Amidala was attempting to contact Anakin from Otoh Gunga , when Dooku appeared on her holoprojector . Inquiring as to what he wanted , Dooku informed Amidala that he had captured Skywalker , while commanding his droids to torture Skywalker through the use of several electric shocks . Dooku then stated that he would be willing to exchange Skywalker for Grievous in a prisoner transfer , and gave her an hour to come to a decision . Amidala , shocked and upset at the capture of her secret husband , was conflicted between her duties to the Republic and her duties to Anakin . Though initially hesitant to give up Grievous due to his importance in the war effort , Jar Jar , who was also present , reminded her that Anakin was " their friend , " finally causing her to relent . Some time thereafter , the prisoner trade took place , with the tactical droid arriving to lead negotiations for the Separatists , while Neeyutnee and Lyonie , alongside Amidala and Jar Jar , were there to represent the Republic . After Grievous had been released to the custody of the Separatists , the tactical droid ordered Anakin ' s subsequent release . After being unceremoniously dropped , still unconscious , at the feet of the opposing negotiators , along with his lightsaber , the Separatist forces left to depart the planet . Aftermath . While all those attending the exchange were upset at the release of Grievous and the Separatists ' subsequent escape , Neeyutnee and Lyonie alike lauded Jar Jar for restoring peace between their two peoples for a second time , even at the expense of letting Grievous go .