Experiments have been performed in a rapid compression machine to investigate the conditions for and the origins of "knock" in controlled autoignition (CAI), or homogeneous charge compression ignition (HCCI). The combustion of n-pentane in air at the composition phi = 0.5 and a gas density of 217 mol m(-3) was studied in the compressed gas temperature range 720 to 820 K. This corresponds to the region in which a transition from non-knocking to knocking reaction occurred in the two-stage ignition regime, close to the minimum of the ignition delay before the negative temperature dependence is encountered. High-resolution pressure records, combined with image intensified, natural light output (with spectral resolving filters in some experiments) were used to characterize the reaction and to identify the behavior in terms of chemical activity associated with chemiluminescence and spatial variations in temperature, respectively. It appears that the knock observed in a rapid compression machine (and hence during CAI) originates from the localized development of the hot stage of ignition, often from near the combustion chamber walls. Exceedingly rapid development of ignition centers may be attributed to the onset of vigorous chain branching via 0 atoms. In conditions where knock does not occur, there is a much more spatially uniform and slower overall development of ignition, which may be restricted by the persistence of reactions involving HO2 radicals to a very late stage of the combustion. The distinctions of these modes of behavior are traced to the way in which the early stages of two-stage ignition interact with the temperature field set up by the compression stroke. (C) 2002 by The Combustion Institute.