Mission to Megalox Beta The mission to Megalox Beta was undertaken during the Cold war by Commander Poe Dameron and Black Squadron of the Resistance to locate Lor San Tekka . They wanted to question the imprisoned Hutt crime lord Grakkus , who had encountered Lor San Tekka a long time ago . The Resistance mission was complicated by the presence of the First Order Agent Terex . When Grakkus offered to reveal the information to whoever freed him first , Poe got BB - 8 and the other astromech droids to disable the prison ' s gravity field , exposing Terex and the prisoners to the planet ' s high gravity . After rescuing Grakkus , the Resistance obtained more information about Lor San Tekka ' s whereabouts but suspended the search to deal with a spy leaking information to the First Order . Prelude . During the Mission to Ovanis , the Black Squadron Commander Poe Dameron learned that the Hutt crime lord Grakkus had encountered the explorer Lor San Tekka . Grakkus had been imprisoned since the Age of the Empire at the forbidding Megalox prison on the planet Megalox Beta . Megalox Beta was a high gravity world and the prison was surrounded by a gravity field that protected the prisoners from the planet ' s gravity . General Leia Organa managed to bribe the prison ' s Warden Luta into admitting Poe and Black Squadron inside the prison . However , the First Order had learnt about Black Squadron ' s planned visit through a spy . They dispatched Agent Terex , whom Black Squadron had previously encountered , to obtain the information from Grakkus . Terex also bribed Warden Luta and her guards into abandoning Poe and his team inside the prison instead of escorting them to Grakkus ' fortress . Poe and his fellow Black Squadron pilots Temmin Wexley , Karé Kun , L ' ulo L ' ampar , and Jessika Pava traveled to Megalox Beta in their starfighters . After being greeted by Warden Luta , they left their ships and droid s in the space station orbiting the prison . The mission . Diving into danger . Black Squadron were escorted by several prison guards aboard a shuttle which landed in a hangar . Upon arriving , the guards abandoned Poe and his team and told them that about the conspiracy . Unable to bribe the guards with a million credit s , Black Squadron decided to fight their way through the crowd of prisoners . Using a gas and setting their blasters to stun , Black Squadron managed to fight their way to Grakkus ' fortress . Upon arriving , they were accosted by Grakkus and his posse of Hutts , who had mechanical enhancements to their bodies . Knowing Poe ' s exploits , Grakkus granted him an audience but revealed that he had another guest , Agent Terex . Knowing that the Resistance and First Order were interested in his information about Lor San Tekka , Grakkus broke his deal with Terex and offered to disclose the information to whoever got him out first . Seeking retribution against Grakkus , Terex met with the imprisoned crime lords Papa Toren , Kan Be , and Isin . In return for helping them escaping , he convinced them to rally their gangs for an assault on Grakkus ' compound . Grakkus instructed the gangsters to kill Grakkus , Poe , and his fellow pilots . Seeking to gain leverage over Grakkus and Terex , Poe instructed BB - 8 and the other astromech droids O - R10N , R2 - HA , and R4 to deactivate the space station ' s gravity field . After knocking out several guards , the droids managed to enter the control chamber . However , they were attacked by a security droid which destroyed O - R10N . Meanwhile , Black Squadron joined forces with the Hutts to defend the fortress from the mob ' s onslaught . Following a struggle , BB - 8 managed to electrocute the security droid , allowing the astromech droids to proceed with their mission . Escaping Megalox . After BB - 8 and the droids disabled the gravity field , Poe and his fellow pilots donned gravity belt s . The full onslaught of Megalox ' s gravity overwhelmed Terex and the gangsters . Papa Toren wept after one of his elves was killed by the heavy gravity . Meanwhile , Poe and his comrades managed to free Grakkus . Poe then contacted Warden Luta and confronted her over her betrayal . He offered to give her back control of the prison if she allowed Black Squadron to escape with Grakkus . Terex summoned his ship " Carrion Spike " and got one of his droid s to evacuate him . Since the crime bosses had failed in their mission , he abandoned them to die . Returning to the space station ' s hangar , Black Squadron and Grakkus reunited with their droids minus Jess ' s droid O - R10N . They then departed in their starfighters with Grakkus following in a shuttle . Before leaving , BB - 8 restored control of the prison back to Warden Luta . However , a vengeful Terex rammed through the space station with his ship " Carrion Spike " , disabling the gravity shield for good . Warden Luta dispatched shuttles to evacuate the prisoners but they were attacked by the " Carrion Spike " . Despite Grakkus ' objections , Temmin convinced Poe to turn Black Squadron around and they attacked Terex ' s ship . With the " Carrion Spike " sustaining heavy damage to its systems , Terex was forced to cloak the ship and retreat into hyperspace . Aftermath . Following the dogfight , Grakkus disclosed information on the worlds that Lor San Tekka to Poe in return for Black Squadron running hyperspace calculations for him . Poe shared this information with General Organa after returning to the Resistance base on D ' Qar . Dameron wanted to continue with the search for the explorer but General Organa told him to investigate how the First Order had been able to obtain information on their operations . Meanwhile , Agent Terex was reprimanded by Captain Phasma for failing to transmit the data he had been sent to obtain . When she ordered him to return to First Order Space for a debriefing , Terex switched off the hologram and decided to delay his return . Ultimately , Poe managed to resume his search for Lor San Tekka . He found that Tekka had gone into retirement at Tuanul village on the planet Jakku . Lor San Tekka provided Poe with a map to Luke Skywalker , claiming it would " set things right . " Shortly later , Tuanal village was attacked by the First Order and Poe was captured . However , BB - 8 managed to escape with the map to the Resistance with the help of the disillusioned stormtrooper Finn , the scavenger Rey , and the smuggler Han Solo . In response to these events , the First Order unleashed its war on the New Republic and the Resistance .