An investigation into the interactions between thiamine monophosphate (TMP) and anions has resulted in the preparation and X-ray characterization of the compounds (TMP)(Hg 2 Br 5 ).0.5H 2 O (1) and (TMP) 2 (Hg 3 I 8 ) (2). In each compound the TMP molecule exists as a monovalent cation in the usual F conformation. The halogenomercurate anions occur in two-dimensional (2-D) network in 1 or one-dimensional (1-D) chain in 2. In both 1 and 2, the structures consist of alternating cationic sheets of the hydrogen-bonded TMP molecules and anionic sheets of the polymeric halogenomercurate anions. The TMP molecule binds to the polymeric anions through the characteristic 'anion bridge I', C(2) H...X...pyrimidinium (X=Br in 1 and I in 2), and electrostatic interactions between electropositive S(1) and halogen atoms. The 'anion bridge II' of the type N(4'1) H...X...thiazolium (X=phosphate group) plays a role in stabilizing the molecular conformation. The biological implication of the host-guest-like complexation between TMP and polymeric anions is discussed.