Objective: Immigrants tend to receive a lower quality of healthcare, which can be a sign of healthcare bias. We examined whether this bias in medical care is associated with a legitimizing process involving two psychosocial factors: threat perception and level of intergroup contact. Method: One hundred eighty six Portuguese health professionals (55.6% clinicians; 44.4% nurses; 78.5% female; Mage = 45.83, range = 23 and 71) completed a questionnaire on prejudiced attitudes toward immigrants, perceptions of health-specific threats, bias in medical practice and level of contact with immigrant patients. Results: For healthcare providers who have more contact with immigrant patients, the perceived health threat mediated the relationship between prejudiced attitudes and treatment bias. In contrast, for healthcare providers with less contact with immigrant patients, the perceived threat was not associated with treatment bias. Conclusions: These findings help to understand the persistence of lower quality medical treatment among immigrants, providing guidelines for future research. In particular, they suggest that perceiving immigrants as a threat to public health is indicative of the providers’ engagement in a legitimizing process of self-reported biased treatment, making this engagement necessary only for providers with greater levels of contact with immigrant patients.