The aim of this study was to evaluate the frequency of mutations of the P. jiroveci dihydropteroate synthase (DHPS) gene in an immunocompromised Portuguese population and to investigate the possible association between DHPS mutations and sulpha exposure. In the studied population, DHPS gene mutations were not significantly more frequent in patients exposed to sulpha drugs compared with patients not exposed (P=0.390). The results of this study suggest that DHPS gene mutations are frequent in the Portuguese immunocompromised population but do not seem associated with previous sulpha exposure. These results are consistent with the possibility of an incidental acquisition and transmission of P. jiroveci mutant types, either by person to person transmission or from an environmental source.