© 2019 Author(s). Objective This study aimed to analyse the impact of comprehensive smoke-free legislation (SFL) on the prevalence and incidence of adult smoking in primary healthcare (PHC) patients from three Spanish regions, overall and stratified by sex. Design Longitudinal observational study conducted between 2008 and 2013. Setting 66 PHC teams in Catalonia, Navarre and the Balearic Islands (Spain). Participants Population over 15 years of age assigned to PHC teams. Primary and secondary outcomes measures Quarterly age-standardised prevalence of non-smoker, smoker and ex-smoker and incidence of new smoker, new ex-smoker and ex-smoker relapse rates were estimated with data retrieved from PHC electronic health records. Joinpoint analysis was used to analyse the trends of age-standardised prevalence and incidence rates. Trends were expressed as annual percentage change and average annual percent change. Results The overall standardised smoker prevalence rate showed a significant downward trend (higher in men than women) and the overall standardised ex-smoker prevalence rate showed a significant increased trend (higher in women than men) in the three regions. Standardised smoker and ex-smoker prevalence rates were higher for men than women in all regions. With regard to overall trends of incidence rates, new smokers decreased significantly in Catalonia and Navarre and similarly in men and women, new ex-smokers decreased significantly and more in men in Catalonia and the Balearic Islands, and ex-smoker relapse increased in Catalonia (particularly in women) and decreased in Navarre. Conclusions Trends in smoking behaviour in PHC patients remain unchanged after the implementation of comprehensive SFL. The impact of the comprehensive SFL might have been lessened by the effect of the preceding partial SFL.