The DNA nucleotide thymidylate is synthesized by the enzyme thymidylate synthase, which catalyzes the reductive methylation of deoxyuridylate using the cofactor methylene-tetrahydrofolate (CH(2)H(4)folate). Most organisms, including humans, rely on the thyA- or TYMS-encoded classic thymidylate synthase, whereas, certain microorganisms, including all Rickettsia and other pathogens, use an alternative thyX-encoded flavin-dependent thymidylate synthase (FDTS). Although several crystal structures of FDTSs have been reported, the absence of a structure with folates limits understanding of the molecular mechanism and the scope of drug design for these enzymes. Here we present X-ray crystal structures of FDTS with several folate derivatives, which together with mutagenesis, kinetic analysis, and computer modeling shed light on the cofactor binding and function. The unique structural data will likely facilitate further elucidation of FDTSs' mechanism and the design of structure-based inhibitors as potential leads to new antimicrobial drugs.