We carried a theoretical investigation on the properties of mercuric iodide in the red tetragonal crystalline phase, and its respective intrinsic defects. Our calculations were performed using the ab initio spin-polarized full-potential linearized augmented plane wave method, and taking into account full atomic relaxation. The results on the structural, electronic, and optical properties were compared to available experimental data.