The arrest of fibrillation of the cardiac muscle (atrial or ventricular) with restoration of the normal rhythm, if successful.