A method of controlling a defibrillator with a function of analyzing an electrocardiogram, includes: dividing an electrocardiogram of a patient into a plurality of analysis zones executing analysis of the electrocardiogram in each of the divided analysis zones based on a result of the analysis of the electrocardiogram in each of the analysis zones, executing determination whether electric shock on the patient is necessary or not, and calculating reliability of the determination and based on a combination of the determination and the reliability, instructing a first procedure to be performed on the patient.