To reduce mortality among suckling piglets, lactating sows are traditionally housed in farrowing crates. Alternatively, lactating sows can be housed in farrowing pens where the sow is loose to ensure more behavioural freedom and consequently a better welfare for the sow, although under commercial conditions, farrowing pens have been associated with increased piglet mortality. Most suckling piglets that die do so within the first week of life, so potentially lactating sows do not have to be restrained during the entire lactation period. Therefore, the aim of the current study was to investigate whether confinement of the sow for a limited number of days after farrowing would affect piglet mortality. A total of 210 sows (Danish Landrace × Danish Yorkshire) were farrowed in specially designed swing-aside combination farrowing pens measuring 2.6 m × 1.8 m (combi-pen), where the sows could be kept loose or in a crate. The sows were either: (a) loose during the entire experimental period, (b) crated from days 0 to 4 postpartum, (c) crated from days 0 to 7 postpartum or (d) crated from introduction to the farrowing pen to day 7 postpartum. The sows and their subsequent litters were studied from introduction to the combi-pen ∼1 week before expected farrowing and until 10 days postpartum. Confinement period of the sow failed to affect the number of stillborn piglets; however, sows that were crated after farrowing had fewer live-born mortality deaths (P < 0.001) compared with the sows that were loose during the experimental period. The increased piglet mortality among the loose sows was because of higher mortality in the first 4 days after farrowing. In conclusion, the current study demonstrated that crating the sow for 4 days postpartum was sufficient to reduce piglet mortality.