Battle over a desert planet In 34 ABY , a battle broke out over a desert planet between the Resistance , the First Order , and the Ranc gang during the later half of the Cold war . In an attempt to prevent the First Order from finding the location of the Resistance base , the Resistance starfighter pilot Poe Dameron exited hyperspace above a remote desert planet . Poe was followed by the First Order Security Bureau Agent Terex and his Ranc gang . After Poe crash - landed his T - 70 X - wing fighter on the planet , a skirmish broke out between the Ranc gang and the Resistance ' s Black Squadron . Terex ' s Ranc gang was subsequently wiped out by First Order forces under Commander Malarus , who then apprehended Terex for insubordination . Prelude . During the later stages of the Cold war , the Resistance operatives Poe Dameron , BB - 8 , C - 3PO , and Oddy Muva undertook a mission to the planet Kaddak to recover the Resistance spy droid N1 - ZX ( " Nunzix " ) , who had purportedly recovered valuable information about the First Order including the location of Supreme Leader Snoke . Poe and the droids managed to escape Kaddak on Poe ' s T - 70 X - wing fighter " Black One " but were separated from Oddy , who stowed aboard Terex ' s ship " Carrion Spike " . Oddy wanted to rescue his wife Sowa Chuan from Terex , who had blackmailed him into spying on Poe ' s Black Squadron . Terex had allowed Poe to escape Kaddak in order to track down the location of the Resistance base . Terex wanted to use the Ranc gang to destroy the Resistance and curry favor with the First Order . Terex ' s plans went against the Supreme Leader ' s orders for First Order forces to avoid open hostility with forces aligned with the New Republic . Despite Captain Phasma ' s objections , Terex was confident that his plan would succeed . Terex used the late Grand Moff Wilhuff Tarkin ' s flagship " Carrion Spike " advance sensors to home in on Poe ' s X - wing . He also assembled a fleet of " Uglies " , starships cobbled up from old starships and other vehicles . However , Poe realized that the information that N1 - ZX was carrying was a trick used by Terex to uncover the Resistance base . After consulting with BB - 8 and C - 3PO , Poe decided to abort their return trip to the Resistance base . Poe instead exited hyperspace above a remote desert planet . Terex and his fleet followed suit . Despite failing to reach the Resistance base , Terex ordered his fleet to destroy Poe instead . Meanwhile , Oddy Muva overpowered and forced Terex ' s henchman Zumgi to take him to his wife Sowa . The battle . Hide and seek . Poe managed to shoot down at least two " Uglies " before one of his X - wing ' s engines was hit by enemy fire and crashed on the desert planet . Poe and the droids were largely unhurt but N1 - ZX ' s right arm was severed . The droids escaped Terex ' s " Uglies " by fleeing into a cave . Meanwhile , Oddy Muva freed his wife and the other slaves . He sought revenge against Terex only to learn that Terex had disembarked from the " Carrion Spike " with a landing party to hunt down Poe and the droids . Terex left another lieutenant Brrang in charge of the " Carrion Spike ' ' and the " Uglies " fleet . In an attempt to slow down Terex and his gang , BB - 8 collapsed an ice stalactite on top of the gangsters . One was crushed by the heavy object . However , Terex managed to use his blaster to shoot down BB - 8 ' s chain , causing the droid to fall . C - 3PO then decided to stay behind to slow down Terex so that Poe Dameron and Nunzix could travel deeper into the cave . When Terex and the Ranc gang arrived , Poe spoke to the native fjor - bat s and claimed that the gangsters wanted to steal their youngling s . While the Ranc gang fought the fjor - bats , Terex confronted C - 3PO . He deactivated the droid by stealing his memory unit . Meanwhile , Poe tried to get N1 - ZX to fight since the droid was a BX - series droid commando . Nunzix refused due to his self - preservation software and his self - centred streak . Shortly later , Poe received contact from his fellow Black Squadron pilot Temmin Wexley that the squadron had arrived to rescue him . Terex ' s lieutenant Brrang believed that the Ranc gang ' s " Uglies " could beat Black Squadron due to their superior numbers and ordered his fleet to destroy Poe ' s comrades . Black Squadron vs Rancs . While Black Squadron fought , Poe tried to convince Nunzix to fight . Fortunately for Poe , Temmin transmitted his droid Mister Bones ' droid personality template onto Poe ' s comlink . After tapping N1 - ZX ' s transponder , N1 - ZX assumed Mister Bones ' personality and slaughtered Terex ' s landing party . Meanwhile , ddy Muva managed to reprogram the " Carrion Spike " battle computers to target any ship without a Resistance transponder , resulting in several " Uglies " being wiped out . He then evacuated his wife Sowa Chuan and the other slaves in four escape pod s . Oddy managed to contact the Resistance pilot Karé Kun and convince her squadron to escort their escape pods to safety . Meanwhile , Terex managed to shoot and decapitate N1 - ZX . Poe then attacked him and forced him to the ground with a blaster . Back in space , Black Squadron escorted the escape pods to the desert planet while under fire from the " Uglies . " One of the Ranc fighters shot down an escape pod . The Resistance pilot L ' ulo L ' ampar retaliated by shooting that fighter . However , he was then shot down by another " Ugly . " Back in the cave , Terex managed to disarm Poe by throwing a knife into his hand . Before he could finish off Poe , BB - 8 electrocuted him , knocking the First Order agent and crime lord unconscious . Elsewhere , Oddy and the escape pods safely entered the desert planet ' s atmosphere . Unwilling to let L ' ulo die in vain , the rest of Black Squadron attacked the " Carrion Spike " and the Ranc fighters . Shortly later , a First Order Maxima - A class heavy cruiser emerged from hyperspace and disgorged a swarm of TIE / fo space superiority fighter . To the surprise of Black Squadron , the First Order heavy cruiser wiped out the Ranc " Uglies " and destroyed Terex ' s flagship " Carrion Spike " . The cruiser also dispatched an Atmospheric Assault Lander and several TIEs to the desert planet ' s surface . These forces had been dispatched by the First Order to arrest Terex for insubordination . Aftermath . The battle ended both the Ranc gang and Agent Terex ' s ambitions of destroying the Resistance . The First Order Commander Malarus and a contingent of stormtroopers landed on the desert planet and met with Poe Dameron . After being assured of their peaceful intentions , Poe allowed them to arrest Terex . Before handing Terex over , he taunted Terex about the destruction of the Ranc gang and his flagship " Carrion Spike " . Terex countered that Poe had lost one of his pilots . However , Poe responded that Terex had lost everything while Poe had only lost one of his friends . Behind the scenes . The Battle over a desert planet appeared as the climax and denouement of the 2016 – 2017 Marvel Comics arc " " . The battle was created by Charles Soule and illustrated by Phil Noto .