Components of the response function of an HPGe detector for 32 keV incident photons (Ba K alpha x-rays) were studied using a Monte Carlo program. Physical mechanisms and the role of incident photons, detector x-rays, photoelectrons and Compton recoil and Auger electrons for each component were investigated. The position, intensity and shape of the components, particularly of the photoelectrons, were studied in detail. Two distinct components for photoelectron escape were identified by considering the fate of photoelectrons, Ge x-rays and Auger electrons produced in the same interaction. In contrast to the often-cited shelflike structure, it was found that both components have a slope. The contribution of recoil electrons to the spectrum for single, double and multiple Compton scattering followed by photoelectric absorption of the scattered photon was investigated. The results of the Monte Carlo simulations are presented along with the measured Ba x-ray spectrum. Copyright (c) 2006 John Wiley & Sons, Ltd.