An implantable medical device configured to be compatible with the environment inside an MRI machine. The implantable medical device (272) includes a housing (244) constructed of an electrically conductive material and pulse generation circuitry (238) within the housing for generating electrical voltage pulses. The implantable medical device further includes a first conductor that is configured to transmit the electrical voltage pulses from the pulse generation circuitry to a patient's cardiac tissue and a second conductor that is configured to provide an electrically conductive path from the patient's cardiac tissue back to the pulse generation circuitry. The implantable medical device further comprises a protection diode (Di) disposed in series with and between the housing (244) and the pulse generation circuitry (238), and a resistor (274) disposed in series with the protection diode (Di) and between the housing and the pulse generation circuitry (238).