Background: The blaZ gene encoding penicillin resistance can be located either chromosomally or on plasmids. The aim of this study was to investigate the genetic relationships and to determine the location of the blaZ gene in S. aureus isolated in bovine mastitis in Finland and Sweden. Methods: Seventy-eight beta-lactamase positive S. aureus isolates from bovine mastitis (34 from Finland and 44 from Sweden) were included in the study. The localization of blaZ gene was determined by Southern blotting. The blaZ genes of the isolates were sequenced and the sequences were translated to beta-lactamase proteins and further grouped as different protein signatures. The isolates and, as control, 33 Swedish and 36 Finnish beta-lactamase negative isolates were typed with pulsed-field gel electrophoresis (PFGE). Results: In 26 out of 34 Finnish isolates (76.5%) and in 25 out of 44 Swedish isolates (56.8%) the blaZ gene was localized on a plasmid. Six different protein signatures were found. One signature was found only in four Swedish isolates, but all other signatures were found both in Finnish and Swedish isolates. The PFGE results revealed a diversity of S. aureus clones. The protein signatures were not clearly associated with certain pulsotypes. Conclusions: The plasmid location of the blaZ gene was not statistically significantly more common in Finland than in Sweden, and hence does not explain the higher proportion of penicillin-resistant isolates of S. aureus causing bovine mastitis in Finland compared to Sweden.