An infection that is caused by a pathogen that would generally not be able to cause an infection in a host with a normal immune system. Such pathogens take advantage of the opportunity, so to speak, that is provided by a weakened immune system. The phenotype is Human Phenotype Ontology entry HP_0031690 (Opportunistic infection).