Transpeptidase that anchors surface proteins to the cell wall (PubMed:21906378, PubMed:21800427, PubMed:22020651). Recognizes and modifies its substrate by proteolytic cleavage of a C-terminal sorting signal. Following cleavage, a covalent intermediate is formed via a thioester bond between the sortase and its substrate, which is then transferred and covalently attached to the cell wall (Probable). This sortase recognizes a Leu-Pro-Asp-Thr-Ser/Ala (LPDTS/A) motif (PubMed:21906378, PubMed:22020651). It has two substrates, YhcR and YfkN (PubMed:21906378, PubMed:21800427, PubMed:22020651). Nonuniformly distributed around the cell periphery in the form of patches or short arcs. Preferentially expressed in the late stationary phase. Mutant releases elevated levels of the sortase substrate YfkN into the culture medium upon phosphate starvation (PubMed:21800427). Inactivation of the gene abolishes the cell wall anchoring of a fusion protein composed of a beta-lactamase reporter and the C-terminal region of the sortase substrate YhcR (PubMed:22020651). Belongs to the bacterial sortase family. Class D subfamily.