Variance and covariance components for piglet survival in different periods were estimated from individual records of 133 004 Danish Landrace piglets and 89 928 Danish Yorkshire piglets, using a liability threshold model including both direct and maternal additive genetic effects. At the individual piglet level, the estimates of direct heritability in Landrace were 0.035, 0.057 and 0.027, and in Yorkshire the estimates were 0.012, 0.030 and 0.025 for liability of survival at farrowing (SVB), from birth to day 5 (SV5) and from day 6 to weaning (SVW), respectively. The estimates of maternal heritability for SVB, SV5 and SVW were, respectively, 0.057, 0.040 and 0.030 in Landrace, and 0.050, 0.038 and 0.019 in Yorkshire. Both direct and maternal genetic correlations between the three survival traits were low and not significantly different from zero, except for a moderate direct genetic correlation between SVB and SV5 and between SV5 and SVW in Landrace. Direct and maternal genetic correlations between piglet birth weight (BW) and SV5 were moderately high, but the correlations between BW and SVB and between BW and SVW were low and most of them were not significantly different from zero. These results suggest that effective genetic improvement in piglet survival before weaning by selection should be based on both direct and maternal additive genetic effects and treat survival in different periods as different traits.