Sugar kinase that catalyzes the ATP-dependent phosphorylation of N-acetylmuramate (MurNAc) and N-acetylglucosamine (GlcNAc) at its C1 hydroxyl group, leading to MurNAc alpha-1P and GlcNAc alpha-1P, respectively. Is involved in peptidoglycan recycling as part of a cell wall recycling pathway that bypasses de novo biosynthesis of the peptidoglycan precursor UDP-MurNAc. Plays a role in intrinsic resistance to fosfomycin, which targets the de novo synthesis of UDP-MurNAc. Is also able to use N-acetylgalactosamine (GalNAc) as a substrate, but not N-acetylmannosamine, N-deacetylated sugars or glucose. ATP + N-acetyl-D-muramate = ADP + H(+) + N-acetyl-alpha-D-muramate 1-phosphate ATP + N-acetyl-D-glucosamine = ADP + H(+) + N-acetyl-alpha-D-glucosamine 1-phosphate kcat is 5.15 sec(-1) for MurNAc phosphorylation. kcat is 6.64 sec(-1) for GlcNAc phosphorylation (at pH 7.6 and 25 degrees Celsius). Cell wall biogenesis; peptidoglycan recycling. Cells lacking this gene accumulate GlcNAc and MurNAc. Deletion of this gene increases fosfomycin sensitivity. Belongs to the kinase AmgK family.