Attenuation artefacts due to implanted cardiac defibrillator leads have previously been shown to adversely impact cardiac PET/CT imaging. In this study, the severity of the problem is characterized, and an image-based method is described which reduces the resulting artefact in PET. Automatic implantable cardioverter defibrillator (AICD) leads cause a moving-metal artefact in the CT sections from which the PET attenuation correction factors (ACFs) are derived. Fluoroscopic cine images were measured to demonstrate that the defibrillator's highly attenuating distal shocking coil moves rhythmically across distances on the order of 1 cm. Rhythmic motion of this magnitude was created in a phantom with a moving defibrillator lead. A CT study of the phantom showed that the artefact contained regions of incorrect, very high CT values and adjacent regions of incorrect, very low CT values. The study also showed that motion made the artefact more severe. A knowledge-based metal artefact reduction method (MAR) is described that reduces the magnitude of the error in the CT images, without use of the corrupted sinograms. The method modifies the corrupted image through a sequence of artefact detection procedures, morphological operations, adjustments of CT values and three-dimensional filtering. The method treats bone the same as metal. The artefact reduction method is shown to run in a few seconds, and is validated by applying it to a series of phantom studies in which reconstructed PET tracer distribution values are wrong by as much as 60% in regions near the CT artefact when MAR is not applied, but the errors are reduced to about 10% of expected values when MAR is applied. MAR changes PET image values by a few per cent in regions not close to the artefact. The changes can be larger in the vicinity of bone. In patient studies, the PET reconstruction without MAR sometimes results in anomalously high values in the infero-septal wall. Clinical performance of MAR is assessed by two physicians' inspection of images generated in 30 patients with and without MAR. Noticeable image differences are judged in 14 of 28 (50%) observations with AICD leads, and significant clinical impact is judged in 2 of 28 (7%) of those observations. A polar map analysis shows significant differences in 10 of 14 (71%) studies with AICD leads, and 0 of 16 (0%) studies without AICD leads. These results show that the MAR method is successful in reducing the magnitude of the metal artefact without incorrectly altering cases without metal artefact. In spite of profound changes to the CT image from the moving metal, the PET ACF in that study was changed by no more than 20%.