Defibrillation is the ending of fibrillation of the atrial or ventricular parts of the heart.