In a 2005 serological survey, carried out in response to an outbreak of H5N2 avian influenza (AI) in ostriches in the Eastern Cape Province, 16.3% of ostrich farms in the Western Cape Province of South Africa were found to be seropositive to H5 AI virus. We subsequently carried out a questionnaire-based census survey on all available registered Western Cape ostrich farms that still existed at the end of 2005 (367 farms, of which 82 were seropositive), in order to identify risk factors associated with farm-level seropositivity. A farm was classified as seropositive for H5 AI virus if one or more birds had tested positive (haemagglutination inhibition titre >1:16) in the 2005 survey, which had been designed to detect a minimum within-group seroprevalence of 10%. For each farm, risk factor information was collected using a questionnaire administered during a face-to-face interview with each farm owner or manager. Information was obtained on the ostrich population, movements of birds, environmental factors, management practices, and frequency of contact between ostriches and various wild bird species. Multiple logistic regression models were developed for the whole Western Cape Province and also for the two largest ostrich farming regions, "Klein Karoo" and "Southern Cape". Seroprevalence differed between regions, being highest in the Klein Karoo (31.6%). In all three models, increased risk of farm-level H5 AI virus seropositivity was associated with increasing numbers of ostriches, excluding chicks, present on the farm. Increased risk of seropositivity was associated with reduced frequency of cleaning of feed troughs (<1x/week vs. >1x/week), both overall (odds ratio (OR)=4.5; 95% confidence interval (CI): 1.5, 13.3) and in the Southern Cape (OR=53.6; 95% CI: 3.3, 864), and with failure to clean and disinfect transport vehicles, both overall (OR=2.3; 95% CI: 1.1, 4.8) and in the Klein Karoo (OR=2.6; 95% CI: 1.1, 6.5). Increased risk of seropositivity was also associated with increasing frequency of contact of ostriches with certain wild bird species: overall with white storks (Ciconia ciconia), in the Southern Cape with gulls (Larus spp.), and in the Klein Karoo with Egyptian geese (Alopochen aegyptiaca).