Ultrahigh-dimensional variable selection plays an increasingly important role in contemporary scientific discoveries and statistical research. Among others, Fan and Lv [JR Stat. Soc. Ser. B Stat. Methodol. 70 (2008) 849911] propose an independent screening framework by ranking the marginal correlations. They showed that the correlation ranking procedure possesses a sure independence screening property within the context of the linear model with Gaussian covariates and responses. In this paper, we propose a more general version of the independent learning with ranking the maximum marginal likelihood estimates or the maximum marginal likelihood itself in generalized linear models. We show that the proposed methods, with Fan and Lv [JR Stat. Soc. Ser. B Stat. Methodol. 70 (2008) 849911] as a very special case, also possess the sure screening property with vanishing false selection rate. The