Poe Dameron, along with C-3PO, make a hasty retreat as Ugly starships unleash a strafing run.
Ugly was the designation given to starships that were pieced together from a variety of disparate sources. Terex, the crime lord aligned with the First Order, commanded an armada of these Uglies as part of his Ranc Gang. He deployed them to pursue Poe Dameron, the Resistance operative, during the period of the Cold War.
In the years that followed the Battle of Jakku, Terex, a former stormtrooper who transitioned into a crime lord, gathered a fleet of Uglies to serve his criminal organization, the Ranc Gang. These Uglies were constructed using components salvaged from various starfighters previously belonging to the Imperial forces and the New Republic. After Poe Dameron and C-3PO successfully absconded with the spy droid N1-ZX, Terex mobilized his Ugly fleet to chase after the Resistance members, with the expectation that they would guide him to the Resistance base located on D'Qar. Eventually, Terex's Uglies, along with his flagship, the Carrion Spike, managed to corner Poe Dameron's T-70 X-wing starfighter, known as Black One, in the airspace above an unknown desert planet.
The Resistance members found themselves pursued by Terex's Uglies; however, they sought refuge within a network of caves on the planet's surface. Terex then opted to dispatch a landing party. Soon after, Poe's comrades from Black Squadron materialized above the desert planet, engaging Terex's Uglies and the Carrion Spike in combat. During the ensuing dogfight, Oddy Muva, another Resistance operative, successfully liberated his wife, Sowa Chuan, and proceeded to reprogram the laser cannons of the Carrion Spike to target Terex's own Uglies, resulting in the destruction of several of them. Despite Terex's subordinates regaining command of the Carrion Spike, both the Uglies and the Spike itself were ultimately obliterated by a Maxima A-class heavy cruiser, which had been dispatched by the First Order with orders to apprehend Terex for his insubordination towards Supreme Leader Snoke's directives, which forbade direct engagement with forces aligned with the New Republic.

The initial appearance of Uglies within Star Wars canon occurred in the 2016 comic, specifically Poe Dameron 8, which was penned by Charles Soule and visually brought to life by Phil Noto and Angel Unzueta. Prior to this, Uglies were introduced into Star Wars Legends through the 1995 novel titled Ambush at Corellia, authored by Roger MacBride Allen.
In the animated television series LEGO Star Wars: The Freemaker Adventures, a non-canon creation by Bob Roth and Bill Motz, Zander Freemaker, one of the central characters, is depicted as a starship mechanic and builder who has meticulously assembled a substantial fleet of Uglies using various starship components. He affectionately refers to them as Z-wings (or "Zander wings") and regards them as his most prized creations. On one occasion, Zander's younger sibling, Rowan Freemaker, along with Roger, commandeered one of Zander's Uglies during their search for one of the Kyber Saber's crystals. Furthermore, Zander possessed at least two "Uglies" that he christened the Blazemaker and Blazemaker Mark II.
The Z-wing concept was initially referenced in the Star Wars Legends reference publication, Star Wars Handbook 1: X-Wing Rogue Squadron.