The objectives of the study were to determine 1) how sampling time between milkings affects the sensitivity and specificity of somatic cell count (SCC) as an indicator for intramammary infection (IMI) status, and 2) which cells are responsible for the diurnal variation in SCC. Six Prince Edward Island, Canada, dairy herds were selected. Quarter samples for SCC were collected immediately before the a. m. milking (pre-a. m.), halfway through the a. m. milking, immediately after the a. m. milking, every 60 min after detachment of the milking unit, and immediately before the p. m. milking (prep. m.). Compared with the geometric mean SCC at the pre- a. m. milking, SCC of quarters with no IMI between milkings was higher up to 7 h after milking. The prep. m. SCC was significantly lower than the pre-a. m. SCC in quarters with no IMI. Specificity of SCC at a cutoff of 200,000 or 500,000 cells/mL as an indicator for IMI status declined substantially after the a. m. milking. In quarters with elevated SCC, the proportion of polymorphonuclear leukocytes was larger immediately after milking. For accurate interpretations of SCC tests whether by a laboratory, portable SCC device, or the California Mastitis Test - veterinarians, researchers, and udder health advisors should take milk samples immediately before milking.