The present invention provides the EspA polypeptide, which is secreted by pathogenic E coli, such as the enteropathogenic (EPEC) and enterohemorrhagic (EHEC) E coli. Diagnosis of disease caused by such pathogenic E coli can be performed by standard techniques, such as those based upon the use of antibodies which bind to EspA to detect the protein, as well as those based on the use of nucleic acid probes for detection of nucleic acids encoding EspA protein. The invention also provides isolated nucleic acid sequences encoding EspA, EspA polypeptide, EspA peptides, a method for producing recombinant EspA, antibodies which bind to EspA, and a kit for the detection of EspA-producing E coli. The invention also provides a method of immunizing a host with EspA to induce a protective immune response to EspA.