The principal function of the immune system is to prevent microbial infection. Therefore, disorders resulting in impaired function of the immune system (immunodeficiency) result in increased susceptibility to infection. Immunodeficiency can arise from an intrinsic defect of a component of the immune system (primary immunodeficiency, or PID). Alternatively, immunodeficiency may be secondary to another pathological condition, which adversely affects immune function. Both primary and secondary immunodeficiencies result in increased susceptibility to infection.