We investigated the antibiotic and heavy-metal resistance mechanisms, virulence genes and clonal relationships of macrolide- and/or lincosamide-resistant (M+/−LR) Streptococcus agalactiae (group B Streptococcus, GBS) isolates from pregnant women in La Rioja in Northern Spain, a region with a significant immigrant population. In total 375 GBS isolates were recovered during 2011. About three-quarters of isolates were from European nationals and the remainder distributed among 23 other nationalities. Seventy-five (20%) were classified as M+/−LR strains and 28 (37%) of these were resistant to ⩾3 classes of antibiotics. Capsular serotypes III (29·3%), V (21·3%) and II (12%) were the most frequent. A wide variety of antibiotic resistance genes were detected in M+/−LR strains; notably, 5·3% harboured the lsa(C) gene associated with cross-resistance, and tet(W) was identified in a single strain. We report, for the first time, the detection of cadmium and copper resistance encoded by tcrB + cadA + cadC genes in 20 M+/−LR strains, which raises the possibility of co-selection of antibiotic and heavy-metal resistance disseminated through mobile genetic elements. The M+/−LR strains were highly diverse by DNA macrorestriction profiles (65 patterns) and 16 multilocus sequence types (STs) distributed among six clonal complexes; the most frequent were ST1, ST19, and ST12, and two strains were novel (ST586 and ST601). In conclusion, a wide diversity of genetic lineages of macrolide, lincosamide and heavy-metal- resistant GBS strains was observed in an ethnically diverse maternal population.