Somatic cell counts, the bacteriological condition of the milk and antibodies against caprine arthritis encephalitis virus (CAEV) were measured monthly throughout lactation in 121 lactating goats of the Murcia-Granada breed in four commercial dairy goat herds. The prevalence of bacterial intramammary infection was 5.6 per cent and the prevalence of CAEV infection was 20.6 per cent. An analysis of variance revealed a significant effect of herd, intramammary infection and the interaction between intramammary infection and CAEV on the somatic cell count. In udder halves free of intramammary infection, the somatic cell counts were significantly lower in seronegative goats than in seropositive goats (P<0.05), but the difference was not significant in udder halves persistently infected by bacteria. There was a significant increase in somatic cell counts due to bacterial intramammary infection (P<0.01) in the seronegative goats, but this effect was not present in the seropositive animals.