The effects of ambient temperature (T; 12-29 degrees C), body weight (BW; 30-90 kg) and metabolisable energy intake (ME) on components of energy balance were studied in seven groups of Piétrain x Large White barrows kept in a respiratory chamber. In Expt 1 (groups 1, 2 and 3), T varied in a cyclic way from 22 degrees C to 12 degrees C and then from 12 degrees C to 22 degrees C with three or four consecutive days at each of 22, 19, 16, 14 and 12 degrees C. Similarly, in Expt 2 (groups 4, 5 and 6), T varied from 19 to 29 degrees C and then from 29 to 19 degrees C with three or four consecutive days at each of 19, 22, 25, 27 and 29 degrees C. In both experiments, pigs were offered feed ad libitum. In Expt 3, pigs (group 7) were exposed to the thermic conditions of Expt 1 but their feed allowance was adjusted on a BW basis to the ad libitum intake recorded at 19 and 22 degrees C in Expt 1. Groups 1, 2, 4, 5 and 7 were used over two successive cycles with initial average BW of 37 kg at cycle 1 (four pigs per group) and 63 kg at cycle 2 (three pigs per group). Groups 3 and 6 were studied at an intermediary stage of growth; their initial BW was 45 kg. The O2 and CO2 concentrations, physical activity and feed intake were continuously and simultaneously measured and used to calculate total heat production (HP; HPtot), HP due to physical activity (HPact), activity-free HP (HP0), and thermic effect of feed. HP was modelled as a non-linear function with T, BW and ME as predictors. Results indicate that all components of HP were proportional to BW(0.60). Physical activity was minimal between 19 and 27 degrees C (8 % ME). The estimated lower critical temperature was 24 degrees C. Between 24 and 12 degrees C, total thermic effect of feed decreased from 31 to 16 % ME, but the short-term thermic effect of feed (5.1 % ME) remained constant. Equations for prediction of HPtot, HPact and HP0 according to BW, T and ME are proposed and evaluated according to literature values; values for the feed cost of thermoregulation in pigs are proposed.