A key determinant for the survival of intracellular pathogens is their ability to subvert the cellular processes of the host to establish a compartment that allows replication. Although most microorganisms internalized by host cells are efficiently cleared following fusion with lysosomes, many pathogens have evolved mechanisms to escape this degradation. In this Review, we provide insight into the molecular processes that are targeted by pathogens that interact with the endoplasmic reticulum and thereby subvert the immune response, ensure their survival intracellularly and cause disease. We also discuss how the endoplasmic reticulum 'strikes back' and controls microbial growth.