During the era of the Cold War, a significant conflict erupted on a desert world. This battle involved the Resistance, the First Order, and the Ranc Gang. In an effort to keep the First Order from discovering the location of the Resistance's main base, the Resistance fighter pilot Poe Dameron emerged from hyperspace above a far-off desert planet. The First Order Security Bureau operative Terex and his Ranc Gang pursued Poe. After Poe's T-70 X-wing starfighter had a crash landing on the planet, a fight broke out between the Ranc Gang and the Resistance's Black Squadron. Subsequently, First Order forces under Commanding Officer Malarus eliminated Terex's Ranc Gang and then took Terex into custody for his acts of disobedience.

As the Cold War drew to a close, Resistance members Poe Dameron, BB-8, C-3PO, and Oddy Muva embarked on a mission to the planet Kaddak. Their goal was to retrieve the Resistance spy droid N1-ZX ("Nunzix"), who allegedly obtained crucial details about the First Order, including the whereabouts of Supreme Leader Snoke. Poe and the droids successfully escaped Kaddak aboard Poe's T-70 X-wing starfighter Black One. However, they were separated from Oddy, who secretly boarded Terex's ship Carrion Spike. Oddy's intention was to rescue his wife Sowa Chuan from Terex, who had coerced him into spying on Poe's Black Squadron.
Terex intentionally allowed Poe to escape Kaddak so he could track down the Resistance base's location. Terex intended to use the Ranc Gang to obliterate the Resistance and gain favor within the First Order. Terex's strategy defied the Supreme Leader's directives, which instructed First Order forces to avoid open conflict with New Republic-aligned entities. Despite Captain Phasma's reservations, Terex was confident in his plan's success. Terex utilized the Carrion Spike's advanced sensors to pinpoint Poe's X-wing. He also gathered a fleet of "Uglies", which were starships assembled from various old starships and vehicles.
However, Poe came to the realization that the information N1-ZX carried was a ruse by Terex to uncover the Resistance base. After consulting with BB-8 and C-3PO, Poe made the decision to cut short their return to the Resistance base. Instead, Poe emerged from hyperspace above a remote desert planet. Terex and his fleet followed after them. Despite failing to reach the Resistance base, Terex ordered his fleet to destroy Poe. Meanwhile, Oddy Muva gained the upper hand and forced Terex's henchman Zumgi to lead him to his wife, Sowa.
Poe managed to shoot down a minimum of two "Uglies" before one of his X-wing's engines was struck by enemy fire, resulting in a crash landing on the desert planet. Poe and the droids were mostly unharmed, but N1-ZX's right arm was severed. The droids evaded Terex's "Uglies" by seeking refuge in a cave. Meanwhile, Oddy Muva liberated his wife and the other enslaved individuals. He sought vengeance against Terex, only to discover that Terex had disembarked from the Carrion Spike with a landing party to hunt down Poe and the droids. Terex placed another lieutenant, Brrang, in command of the Carrion Spike and the "Uglies" fleet.
In an attempt to impede Terex and his gang, BB-8 caused an ice stalactite to collapse onto the gangsters. The heavy object crushed one of them. However, Terex managed to use his blaster to sever BB-8's chain, causing the droid to fall. C-3PO then made the decision to stay behind to slow down Terex, allowing Poe Dameron and Nunzix to venture deeper into the cave. When Terex and the Ranc Gang arrived, Poe communicated with the native fjor-bats and claimed that the gangsters intended to steal their younglings. While the Ranc Gang engaged the fjor-bats, Terex confronted C-3PO. He deactivated the droid by removing his memory unit.
Meanwhile, Poe attempted to persuade N1-ZX to fight, given that the droid was a BX-series droid commando. Nunzix declined due to his self-preservation programming and his self-centered nature. Shortly thereafter, Poe received communication from his fellow Black Squadron pilot Temmin Wexley, indicating that the squadron had arrived to rescue him. Terex's lieutenant, Brrang, believed that the Ranc Gang's "Uglies" could defeat Black Squadron due to their numerical advantage and ordered his fleet to destroy Poe's comrades.

As Black Squadron engaged in battle, Poe attempted 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 adopted Mister Bones' personality and massacred Terex's landing party. Meanwhile, Oddy Muva successfully reprogrammed the Carrion Spike's battle computers to target any ship lacking a Resistance transponder, resulting in the destruction of several "Uglies." He then evacuated his wife, Sowa Chuan, and the other enslaved individuals in four escape pods. Oddy managed to contact the Resistance pilot Karé Kun and persuaded her squadron to escort their escape pods to safety.
Meanwhile, Terex managed to shoot and decapitate N1-ZX. Poe then attacked him, forcing 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 down 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, rendering the First Order agent and crime boss 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 thereafter, a First Order Maxima-A class heavy cruiser emerged from hyperspace and released a swarm of TIE/fo space superiority fighter. To the surprise of Black Squadron, the First Order heavy cruiser obliterated the Ranc "Uglies" and destroyed Terex's flagship, the Carrion Spike. The cruiser also deployed an Atmospheric Assault Lander and several TIEs to the desert planet's surface. These forces had been sent by the First Order to arrest Terex for his insubordination.

The battle brought an end to both the Ranc Gang and Agent Terex's aspirations of destroying the Resistance. The First Order Commanding Officer Malarus and a contingent of stormtroopers landed on the desert planet and met with Poe Dameron. After receiving assurances of their peaceful intentions, Poe permitted them to arrest Terex. Before handing Terex over, he mocked him regarding the destruction of the Ranc Gang and his flagship, the Carrion Spike. Terex retorted 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.
The battle on a desert planet was first depicted in the 2017 comic book Poe Dameron 11, authored by Charles Soule and illustrated by Phil Noto.