The insect stage of the protozoan parasite Leishmania mexicana secretes a phosphomonoesterase in the form of a filamentous complex. The polypeptide subunits of this polymer are modified by phosphoglycans and/or oligomannosyl residues linked to phosphoserine. Based on peptide sequence data of a predominant 100 kDa protein of the filamentous complex, two tandemly arranged, single copy genes, lmsap1 and lmsap2, were cloned and sequenced. lmsap1 predicts a protein with features characteristic of acid phosphatases and a remarkable serine- and threonine-rich region of 32 amino acids close to the C-terminus. In the otherwise identical lmsap2 product, this region is extended to 383 amino acids and is composed of short Ser/Thr-rich repeats. Deletion analysis demonstrates that lmsap1 encodes the major 100 kDa protein of the complex while a minor 200 kDa component is derived from the lmsap2 gene. Null mutants of either gene retain the ability to secrete acid phosphatase filaments, while a deletion of both genes results in Leishmania defective in enzyme formation. The Ser/Thr-rich domains are the targets for phosphoglycan modifications as shown by the expression of secreted fusion proteins composed of these C-terminal regions and the N-terminal domain of a lysosomal acid phosphatase.