Objectives: To elucidate the diversity and evolutionary history of plasmid- and chromosomally-located blaZ, to detect indications of frequent exchange of blaZ between human and bovine staphylococci and to estimate the frequency of transfer of blaZ between coagulase-negative staphylococci (CoNS) and Staphylococcus aureus of bovine origin. Methods: blaZ was detected in 143 strains of penicillin-resistant S. aureus and CoNS from five Danish cattle herds (n = 25/23), random CoNS isolates from Denmark (n = 37), a collection of S. aureus from six different countries (n = 52), humans in Denmark (n = 3) and beta-lactamase control strains (n = 3). The sequence was determined in 105 strains and compared to published sequences by pairwise and multiple alignments. Maximum likelihood analysis was performed including bootstrap analysis. Parsimony, neighbour joining and consensus comparisons were performed for recombination. The localization of blaZ was determined by Southern blotting in 108 isolates. Results: All penicillin-resistant strains carried blaZ and showed a similar organization of blaR1 and blaZ. The blaZ gene was localized to a plasmid in only 16 of the resistant strains. Sixty-nine sequences representing 105 isolates and sequences retrieved from public databases were compared. A phylogenetic tree showed that blaZ exists in three evolutionary lines: one group was of plasmid origin, one group was of chromosomal origin and one intermediate group. Sixty-nine sequence types were demonstrated. They translated into 11 BlaZ protein types. The major types all contained strains of both human and bovine origin, and more than one Staphylococcus species, demonstrating a shared gene pool. In a comparison of S. aureus and CoNS obtained from five Danish cattle herds, the same type of blaZ was only detected in one case. Conclusions: Results indicated a separate evolution for plasmid- and chromosomally-encoded blaZ. Although a common gene pool seems to exist among staphylococci, exchange of blaZ between strains and species is judged to be an extremely rare event.