BackgroundIdentification of aetiological agents of mastitis in dairy cattle is important for herd management of udder health. In Norway, results from mastitis diagnostics are systematically recorded in a central database, so that the dairy industry can follow trends in the recorded frequency of udder pathogens and antimicrobial resistance patterns at national level. However, bacteriological testing of milk samples is based on voluntary sampling, and data are therefore subject to some bias. The aim of this study was to examine the prevalence of udder pathogens in Norwegian dairy cows by analysing data from the national routine mastitis diagnostics and to explore how routines for sampling and diagnostic interpretations may affect the apparent prevalence of different bacterial pathogens. We also assessed associations between udder pathogen findings and the barn- and milking systems of the herds.ResultsThe most frequently detected major udder pathogens among all milk samples submitted for bacterial culture (n = 36,431) wereStaphylococcus aureus(24.5%),Streptococcus dysgalactiae(13.3%) andStreptococcus uberis(9.0%). In the subset of samples from clinical mastitis (n = 7598);Escherichia coli(14.5%) was the second most frequently detected pathogen followingS. aureus(27.1%).Staphylococcus epidermidis(10.0%),Corynebacterium bovis(9.4%), andStaphylococcus chromogenes(6.0%) dominated among the minor udder pathogens. Non-aureus staphylococci as a group, identified in 39% of the sampling events, was the most frequently identified udder pathogen in Norway. By using different definitions of cow-level bacterial diagnoses, the distribution of minor udder pathogens changed.Several udder pathogens were associated with the barn- and milking system but the associations were reduced in strength when data were analysed from farms with a comparable herd size.S. aureuswas associated with tiestall housing,E. coliandS. dysgalactiaewere associated with freestall housing, andS. epidermidiswas associated with automatic milking systems.Only 2.5% of the 10,675 testedS. aureusisolates were resistant to benzylpenicillin. Among the 2153 tested non-aureus staphylococci, altogether 34% were resistant to benzylpenicillin.ConclusionsThis study presents the recorded prevalence of udder pathogens in Norway over a two-year period and assesses the possible impact of the sampling strategies, diagnostic methods and diagnostic criteria utilized in Norway, as well as associations with different housing and milking systems. The national database with records of results from routine mastitis diagnostics in Norway provides valuable information about the aetiology of bovine mastitis at population level and can reveal shifts in the distribution and occurrence of udder pathogens.Supplementary InformationThe online version contains supplementary material available at 10.1186/s13028-023-00681-2.