The use of a time-space scan statistic--defined by a cylindrical window with a circular geographic base and height corresponding to time--was investigated as a method of detecting clustering in veterinary epidemiology whilst controlling confounding. The example data set consisted of farmer-recorded occurrence of body strike and breech strike between August 1998 and May 1999 in 26 sheep flocks located in two local government areas of southeastern Queensland, Australia. This information was derived from a questionnaire survey mailed to farmers. Potentially confounding factors included in the investigation were flock size (< or = median, > median), flock structure (proportion of lambs, wethers, ewes and rams), pesticide application for flystrike control (yes, no) and rainfall (< or = median, > median). The total sheep population within selected flocks was 92,660; 1012 (1.09%) and 518 (0.56%) cases of body strike and breech strike were reported in 16 and 10 flocks, respectively.Clustering analyses of body strike and breech strike were undertaken separately, because different predisposing factors are associated with these diseases. Significant clustering of body strike (28.76 degrees S, 151.82 degrees E) during March 1999 and breech strike (28.73 degrees S, 151.16 degrees E) between February and May 1999 was detected. Adjusting for flock structure, flock size, pesticide use and rainfall did not alter the most likely cluster of body strike identified--although the relative risk changed (> 10%) after adjusting for flock structure. Adjustment for flock structure and rainfall resulted in different clusters of breech strike being identified.