The availability of a rooting substrate may profoundly affect behaviour and welfare of pigs. Apart from their actual housing environment, also the conditions present in early life and individual characteristics may influence the behaviour of pigs. The present study investigated the relative importance of the housing environment during rearing and the actual housing environment on behaviour during the finishing phase, pathological lesions of the heart and stomach wall and weight gain in pigs with diverging coping characteristics. Pigs were reared either without a rooting substrate (barren, B) or in identical pens enriched with straw bedding (enriched, E). During the suckling period piglets were subjected to the Backtest. The Backtest classification of pigs is, to a certain extent, predictive of their coping style. Each piglet was restrained in supine position for 1 min and its resistance (i.e. the number of escape attempts) was scored. Sixty high-resisting (HR) and 60 lowresisting (LR) pigs were selected. Half of these pigs were from barren and the other half from enriched rearing environments. Pigs were housed in groups of six (three HR and three LR) after weaning. At 10 weeks of age, environmental conditions (B or E) were switched for half of the pens Behaviour patterns of pigs during the finishing phase were largely determined by the actual presence or absence of straw bedding. Pigs that changed from enriched to barren pens (EB pigs), however, showed an increased inactivity beyond the inactivity levels of pigs with a barren rearing history (BB pigs). The impact of rearing history on chewing, manipulative and play behaviour in later life was larger for LR than for HR pigs. The availability of straw reduced the occurrence of gastric lesions in LR, but not in HR pigs. Feed intake tended to be lower in EB pens than in EE pens, but this was reflected in the growth rate of HR pigs only. HR–EE pigs showed a higher weight gain than HR–EB pigs. In conclusion, behaviour patterns of pigs were largely influenced by the actual (in)availability of straw. The influence of rearing history on behaviour, occurrence of gastric lesions and weight gain was smaller, and depended to some extent on coping characteristics (LR or HR) of the pigs under study.