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). 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 Binds 1 Mg(2+) ion per subunit. Cofactor biosynthesis; thiamine diphosphate biosynthesis; thiamine phosphate from 4-amino-2-methyl-5-diphosphomethylpyrimidine and 4-methyl-5-(2-phosphoethyl)-thiazole: step 1/1. There is also a thiED fusion protein in this bacteria (AC Q8FTH8). Belongs to the thiamine-phosphate synthase family.