Helix pomatia agglutinin (HPA) is a lectin that has been used extensively in histopathology, since its binding to tissue sections from breast and colon cancers is correlated with the worst prognosis for the patients. The lectin recognizes alpha-d-N-acetylgalactosamine (alphaGalNAc) containing epitopes which are only present in cancer cell lines having a high likelihood to undergo metastasis, such as the HT29 cancer colon cell line. Several breast cancer cell lines have also been shown to be labeled, although IGROV1, an ovarian cancer cell line, is not. Inhibition studies, using GalNAc monosaccharides, are reported here, showing that the labeling is dependent upon the presence of carbohydrate epitopes. The crystal structures of the lectin complexed with two GalNAc containing epitopes associated with cancer, the Tn (alphaGalNAc-Ser) and Forssman (alphaGalNAc1-3GalNAc) antigens, show the lectin's specificity for GalNAc is due to a particular network of hydrogen bonds. A histidine residue makes hydrophobic contact with the aglycon, rationalizing the preference for GalNAc bearing an additional sugar or amino acid in the alpha position. These structures provide the molecular basis for the use of HPA in metastasis research.