Horizontal genetic transfer (HGT) is a common phenomenon in eukaryotic genomes. However, the mechanisms by which HGT-derived genes persist and integrate into other pathways remain unclear. This topic is of significant interest because, over time, the stressors that initially favoured the fixation of HGT may diminish or disappear. Despite this, the foreign genes may continue to exist if they become part of a broader stress response or other pathways. The conventional model suggests that the acquisition of HGT equates to adaptation. However, this model may evolve into more complex interactions between gene products, a concept we refer to as the 'Integrated HGT Model' (IHM). To explore this concept further, we studied specialized HGT-derived genes that encode heavy metal detoxification functions. The recruitment of these genes into other pathways could provide clear examples of IHM. In our study, we exposed two anciently diverged species of polyextremophilic red algae from the Galdieria genus to arsenic and mercury stress in laboratory cultures. We then analysed the transcriptome data using differential and coexpression analysis. Our findings revealed that mercury detoxification follows a 'one gene-one function' model, resulting in an indivisible response. In contrast, the arsH gene in the arsenite response pathway demonstrated a complex pattern of duplication, divergence and potential neofunctionalization, consistent with the IHM. Our research sheds light on the fate and integration of ancient HGTs, providing a novel perspective on the ecology of extremophiles.