During the last decade there have been significant socio-demographic changes in Spain with potential impact on gestational length. The aim of the study was to describe the evolution of gestational age during 1997-2008, separately for native-born and immigrant population, in order to assess their contribution to the overall pattern of gestational length. A cross-sectional study of 5,018,229 singleton births born between 1997 and 2008 was carried out. The annual mean of gestational age was calculated and compared by means of ANOVA test, globally and also separately for natives and immigrants. Proportions of deliveries by gestational age and maternal characteristics were calculated in 4 periods and compared by means of Chi-square tests. Crude and adjusted multinomial logistic regression models were fitted separately for native-born and immigrant women. Our results show that in the last 12 years a progressive shortening in the mean gestational age has taken place in Spain. While the overall decrease of gestational length along the period was 1.5 days, closer to that in Spanish women (1.3 days), it was 2.3 days among immigrants. In both groups this shortening was mainly due to an increase in the proportion of 37-39 weeks deliveries at the expense of a substantial decrease in those with 40 weeks. These trends remained after controlling for known confounding variables such as maternal age, parity and occupation. Further analysis of its causes and public health implications are recommended.