In the oxidized "ES" state of cytochrome c peroxidase, Trp-191 is reversibly oxidized to a stable cation free radical by the hypervalent heme. To explore the potential for engineering a binding site for heterocyclic compounds at this site, the mutant W191G was constructed. Two independent crystal structures of W191G at 2.1- and 2.3-A resolution show that W191G contains a well-defined, approximately 180-A3 cavity at the Trp-191 site. The cavity is occupied by five ordered water molecules which participate in an extensive hydrogen-bonding network with each other, with polar main-chain atoms, and with the carboxylate of Asp-235. After a number of heterocyclic compounds were screened, evidence was obtained that substituted imidazoles bind to the cavity of W191G. Titration of W191G with imidazole resulted in a perturbation of the Soret absorption band that was not observed for W191H, W191F, or the native enzyme. The dissociation constants for binding of benzimidazole, imidazole, 2-ethylimidazole, 1-methylimidazole, 2-methylimidazole, and 1,2-dimethylimidazole to W191G were respectively 2.58, 0.70, 0.36, 0.057, 0.047, and 0.027 mM at pH 6.0. The highest binding affinity was exhibited by 1,2-dimethylimidazole, indicating that steric interactions and the efficiency of filling the cavity are important determinants for specificity. The Kd for imidazole binding increased from 0.7 mM at pH 6 to 3.0 mM at pH 8 and could be fit to a single proton ionization curve with a pKa of 7.4, demonstrating the preferential binding by the imidazolium ion (pKa = 7.3). The binding of a number of substituted imidazoles to the cavity of W191G was verified by X-ray crystallographic analysis. The most clearly defined density was observed for W191G crystals soaked in 1 mM 1,2-dimethylimidazole and was consistent with an oriented occupation in which the unsubstituted nitrogen forms a hydrogen bond or ion pair interaction with Asp-235. Thus, enhanced binding of positively charged molecules may be the result of interactions with this carboxylate. An analogous interaction may stabilize the developing positive charge on the Trp-191 radical of the wild-type enzyme. While the oxidation of imidazoles by the ferryl intermediate of W191G was neither expected nor observed, this study has defined the structural determinants for small molecule binding to an artificially created cavity near a heme center which is capable of generating oxidized species at a potential of over 1 V, and these results will guide future attempts for novel substrate oxidation by CCP.