Surface proteins in Gram-positive bacteria are anchored to the cell wall by the action of sortase enzymes. The Staphylococcus aureus sortase A (SrtA) protein anchors proteins by recognizing a cell wall sorting signal containing the amino acid sequence LPXTG. To understand how SrtA binds this sequence, we carried out NMR studies of new peptidyl-cyanoalkene and peptidyl-sulfhydryl inhibitors that contain the sorting signal sequence LPAT. These studies combined with amino acid mutagenesis identified a catalytically important and conserved binding surface formed by residues A118, T180, and I182. Compatible with its recently proposed role as a general base, R197 is also shown to be required for catalysis.