The disclosure relates to methods of prophylactic and therapeutic treatments of a Pneumocystis infection (i.e., an infection caused by Pneumocystis jirovecii) in a subject by administering to the subject a compound of any of formulas (l)-(lll) (e.g., a salt of Compound 1, or a neutral form thereof). The disclosure also relates to methods of inhibiting the replication of a Pneumocystis spp. The methods of the disclosure can be useful in immunocompromised subjects.