Condenses 4-methyl-5-(beta-hydroxyethyl)thiazole monophosphate (THZ-P) and 2-methyl-4-amino-5-hydroxymethyl pyrimidine pyrophosphate (HMP-PP) to form thiamine monophosphate (TMP). Catalyzes the synthesis of the hydroxymethylpyrimidine phosphate (HMP-P) moiety of thiamine from aminoimidazole ribotide (AIR) in a radical S-adenosyl-L-methionine (SAM)-dependent reaction. 2-[(2R,5Z)-2-carboxy-4-methylthiazol-5(2H)-ylidene]ethyl phosphate + 4-amino-2-methyl-5-(diphosphooxymethyl)pyrimidine + 2 H(+) = CO2 + diphosphate + thiamine phosphate 2-(2-carboxy-4-methylthiazol-5-yl)ethyl phosphate + 4-amino-2-methyl-5-(diphosphooxymethyl)pyrimidine + 2 H(+) = CO2 + diphosphate + thiamine phosphate 4-amino-2-methyl-5-(diphosphooxymethyl)pyrimidine + 4-methyl-5-(2-phosphooxyethyl)-thiazole + H(+) = diphosphate + thiamine phosphate 5-amino-1-(5-phospho-beta-D-ribosyl)imidazole + S-adenosyl-L-methionine = 4-amino-2-methyl-5-(phosphooxymethyl)pyrimidine + 5'-deoxyadenosine + CO + formate + 3 H(+) + L-methionine Binds 1 [4Fe-4S] cluster per subunit. The cluster is coordinated with 3 cysteines and an exchangeable S-adenosyl-L-methionine. Cofactor biosynthesis; thiamine diphosphate biosynthesis; thiamine phosphate from 4-amino-2-methyl-5-diphosphomethylpyrimidine and 4-methyl-5-(2-phosphoethyl)-thiazole: step 1/1. In the N-terminal section; belongs to the thiamine-phosphate synthase family. In the C-terminal section; belongs to the ThiC family.