Updated publication reference for PubMed record(s): 31930742. Magnesium homeostasis is essential for life and depends on magnesium transporters whose activity and ion selectivity needs to be tightly controlled. Rhomboid intramembrane proteases pervade the prokaryotic kingdom but their functions are largely elusive. Using proteomics we find that Bacillus subtilis rhomboid protease YqgP interacts with the membrane bound ATP-dependent processive metalloprotease FtsH and cleaves MgtE, the major high-affinity magnesium transporter in B. subtilis. MgtE cleavage by YqgP is potentiated in low magnesium and high manganese or zinc conditions, which protects B. subtilis from Mn2+/ Zn2+ toxicity. The N-terminal cytosolic domain of YqgP binds Mn2+ and Zn2+ and facilitates MgtE cleavage. Independently of its protease activity, YqgP acts as a substrate adaptor for FtsH, which is necessary for degradation of MgtE. YqgP thus unites a protease and pseudoprotease function, which indicates the evolutionary origin of rhomboid pseudoproteases, such as Derlins that are intimately involved in ER associated degradation. Conceptually, the YqgP-FtsH system we describe here is equivalent to a primordial form of ‘ERAD’ in bacteria and exemplifies an ancestral function of rhomboid-superfamily proteins.