A state in which the immune system experiences lowered resistance to disease. It is often a result of certain infections or chemotherapy treatments.