Targeted disruption of a specific gene and its subsequent restoration in obligate intracellular bacteria remains extremely challenging due to their absolute requirement for residence inside a host cell to replicate. Here, targeted allelic exchange mutations were created to inactivate two genes and then to restore one of the two genes of a rickettsial pathogen. Ehrlichia chaffeensis. These methods were then also successfully utilized in Ehrlichia canis and Anaplasma phagocyophilum. The resultant mutated pathogens are useful in immunogenic compositions for reducing the incidence of or severity of infection with ricksettsial pathogens.