Many behaviors with lasting health impact are initiated in adolescence. Substance use is one such behavior. To analyse the factors involved in adolescent substance use among Portuguese and Spanish boys and girls, an explanatory model was developed using structural equations modelling. The model proposes that the impact of social contexts (family, friends, classmates and teachers) on substance use (tobacco, alcohol and illicit drugs) is mediated by perceptions of well-being (psychological symptoms, well-being and school satisfaction). Data on 1589 Portuguese (mean age = 13.27, SD =. 59) and 4191 Spanish adolescents (mean age= 13.21; SD =.47) who took part in the HBSC/WHO survey were analysed. The model fits the data of each country (CFI >.90; RMSEA < .03) and the majority of the relationships proposed in the model have been as expected for both samples. The relations with a major effect, for both countries, were: the negative effect of family on psychological symptoms and the positive effect of family on subjective well-being; the negative effect of classmates on psychological symptoms; the positive effect of teachers on school satisfaction; the effect of psychological symptoms (negative) and school satisfaction (positive) on well-being; the negative effect of school satisfaction on tobacco and alcohol use; and the positive effect of tobacco on alcohol use, and alcohol use on cannabis. For each of the dependent factors studied (tobacco, alcohol and illicit drugs), the levels of explained variance varied between 9% (for tobacco use) and 46% (for alcohol use). Some non-invariant paths were obtained in country comparisons, controlling for gender. In multivariate analyses the paths from tobacco use to cannabis and from alcohol to cannabis were significant, but much stronger for Spanish girls than Portuguese girls.