The processing steps associated with purification of source material, crystal growth, and attachment of electrical contacts can introduce defects into mercuric iodide (HgI2) that degrade the performance of detectors. We have employed low-temperature photoluminescence (PL) spectroscopy to study radiative recombination centers in the interfacial region between a thin semitransparent film of silver and mercuric iodide. The Ag film was found to introduce a new broad emission band centered at 5490 Å in the photoluminescence spectrum of HgI2. This PL feature can be used as a signature to identify the existence of Ag as a contaminant in HgI2 crystals and detectors. Experiments were also conducted on mercuric iodide surfaces that had been doped with silver, and the results showed that Ag is a rapid diffuser in bulk HgI2. Detectors with silver electrodes were also fabricated and tested using an americium-241 gamma-ray source. Large increases in the leakage currents were observed for the Ag-doped HgI2 devices, indicated that Ag impurities are electrically active in HgI2. These measurements show that silver is unacceptable as an electrode material for mercuric iodide x-ray and gamma-ray detector applications. In addition, they reveal that caution must be taken during handling of mercuric iodide source material, crystals, and detectors to avoid contact with silver, silver compounds, or with any material that contains silver as a contaminant.