Molecular dynamics simulations of histidine-based dipeptides in water show that a protonated histidine side chain group has a propensity for forming like-charged contact pairs with another protonated histidine or with arginine. This effect is of similar strenght to that in observed previously for arginine-arginine pairing. Even stronger contact pairs are formed in singly protonated or deprotonated dihistidine, where stacking of aromatic rings is not weakened by Coulomb repulsion between the side chains. Qualitatively the same pairing behavior is also observed in a mixed solution of imidazole and imidazolium chloride.