Together, the fomA and fomB genes in the fosfomycin biosynthetic gene cluster of Streptomyces wedmorensis confer high-level fosfomycin resistance on Escherichia coli. To elucidate their functions, the fomA and fomB genes were overexpressed in E. coli and the gene products were characterized. The recombinant FomA protein converted fosfomycin to fosfomycin monophosphate, which was inactive on E. coli, in the presence of a magnesium ion and ATP. On the other hand, the recombinant FomB protein did not inactivate fosfomycin. However, a reaction mixture containing FomA and FomB proteins converted fosfomycin to fosfomycin monophosphate and fosfomycin diphosphate in the presence of ATP and a magnesium ion, indicating that FomA and FomB catalyzed phosphorylations of fosfomycin and fosfomycin monophosphate, respectively. These results suggest that the self-resistance mechanism of the fosfomycin-producing organism S. wedmorensis is mono- and diphosphorylation of the phosphonate function of fosfomycin catalyzed by FomA and FomB.