D4, alternatively known as Deefour, served as the astromech droid utilized by Cai, the female warrior of the Mistryl Shadow Guard, on the starfighter named Mirage.
During the year 0 BBY, Deefour lent aid to Cai, Shada D'ukal, and Karoly D'ulin in their endeavor to return a module of the Hammertong to Emberlene. However, the droid was taken by Riij Winward, an agent of the Rebel forces, whose objective was to ensure that his Alliance commanders obtained the technical data regarding the superlaser prototype that Deefour possessed.
Despite this, the youthful Rebel made an assurance that he would leave the droid with a Bothan shipping enterprise located on Piroket for retrieval, contingent upon the Mistryl returning the Alliance freighter they had previously commandeered.