Geometry optimizations of the structures of histamine (neutral and monocation) in the N(3)-H and N(1)-H tautomeric forms were performed at the ab initio Hartree-Fock level with the STO-3G basis set. Values of the structural parameters and their changes upon protonation and/or tautomerization are in good agreement with data from X-ray crystal-structure analysis of histamine and several analogues. Earlier predictions of the tautomeric preference from calculations using frozen geometries based on crystal-structure data are confirmed by calculations of energies of histamine in the fully optimized geometries with both the STO-3G and LP-3G basis sets and by comparisons of the minima in the molecular electrostatic potentials of the two tautomers. These results support a previously proposed model for the activation of the histamine H2 receptor.