An implantable medical device comprising: a lead including one or more sensing electrodes and one or more therapy delivery electrodes; a sensor configured to detect the presence of static and time-varying scan fields in a magnetic resonance imaging environment; and a controller, in electrical communication with the lead and the sensor, configured to process signals related to tachycardia events sensed via the one or more sensing electrodes and to deliver pacing and shock therapy signals via the one or more therapy delivery electrodes, the controller further configured to compare the sensed static and time-varying scan fields to static and time-varying scan field thresholds, wherein the controller controls delivery of anti-tachycardia pacing and shock therapy signals as a function of the detected tachycardia events, the comparison of the sensed static scan field to the static scan field threshold, and the comparison of the time-varying scan fields to the time-varying scan field thresholds, wherein the controller is adapted to (a) process sensed tachycardia events and enable delivery of the anti-tachycardia pacing and shock therapy signals when neither of the static and time-varying scan field thresholds is exceeded, (c) disqualify the tachycardia events to inhibit delivery of the anti-tachycardia pacing and shock therapy signals when both the static and time-varying scan field thresholds are exceeded, characterised in that the controller is further adapted to (b) process sensed tachycardia events, enable delivery of the anti-tachycardia pacing signals, and inhibits delivery of the shock therapy signals when the static scan field threshold is exceeded and the time-varying scan field thresholds is not exceeded. a lead including one or more sensing electrodes and one or more therapy delivery electrodes; a sensor configured to detect the presence of static and time-varying scan fields in a magnetic resonance imaging environment; and a controller, in electrical communication with the lead and the sensor, configured to process signals related to tachycardia events sensed via the one or more sensing electrodes and to deliver pacing and shock therapy signals via the one or more therapy delivery electrodes, the controller further configured to compare the sensed static and time-varying scan fields to static and time-varying scan field thresholds, wherein the controller controls delivery of anti-tachycardia pacing and shock therapy signals as a function of the detected tachycardia events, the comparison of the sensed static scan field to the static scan field threshold, and the comparison of the time-varying scan fields to the time-varying scan field thresholds, wherein the controller is adapted to (a) process sensed tachycardia events and enable delivery of the anti-tachycardia pacing and shock therapy signals when neither of the static and time-varying scan field thresholds is exceeded, (c) disqualify the tachycardia events to inhibit delivery of the anti-tachycardia pacing and shock therapy signals when both the static and time-varying scan field thresholds are exceeded, characterised in that the controller is further adapted to (b) process sensed tachycardia events, enable delivery of the anti-tachycardia pacing signals, and inhibits delivery of the shock therapy signals when the static scan field threshold is exceeded and the time-varying scan field thresholds is not exceeded.