We analyzed the impact of municipal areas socio-economic environment and trends in inequalities in smoking in Spain, 1987-2001. Inequalities in smoking have increased in both sexes. In males are the result of a higher decrease in the prevalence of smoking among the most advantaged groups, and in women, it is due to a higher increase among the less advantaged groups. Males residing in more deprived areas have a higher likelihood of smoking. For women, the likelihood of smoking is higher when residing in less deprived municipal areas up to 1995/1997. Individual and environmental social factors are relevant for smoking in Spain.