A geographical analysis of how commonly prescribed oral antibiotics are quantitatively and qualitatively responsible for the different local rates of erythromycin and penicillin resistance in Streptococcus pneumoniae in Spain is presented. From 1998 to 1999 a multicenter surveillance study yielded 1,684 consecutive S. pneumoniae isolates from community-acquired respiratory infections. Data on antibiotic sales in the retail market for the same period were gathered, and the corresponding defined doses per 1,000 inhabitants per day were calculated. Macrolides and beta-lactams were considered separately. Macrolides were subdivided into thrice-, twice-, and once-a-day macrolides, and beta-lactams were split into aminopenicillins and cephalosporins. Univariate Spearman nonparametric coefficients (R) were calculated, and variables proving to be significantly associated (P < 0.1) were entered into several multiple lineal regression models. Ample variation in both resistance rates and antibiotic consumption was seen. Multivariate analyses showed that integrated consumption of both macrolides and beta-lactams accounted well for erythromycin (R(2) = 0.722; P = 0.002) and penicillin (R(2) = 0.706; P = 0.002) resistance. Macrolides were more important drivers for local differences in both erythromycin and penicillin resistance than beta-lactams were. Consumption of once-a-day macrolides was key for local erythromycin resistance variations. Cephalosporins were slightly more important penicillin resistance drivers than aminopenicillins were.