The aim of this study was to control endemic contagious agalactia due to Mycoplasma agalactiae in a semi-extensive goat herd by means of vaccination with an inactivated vaccine. Groups of 400 goats were vaccinated one month before and three months after parturition (group A), one month before and four months after parturition (group B), and two months and one month before and three months after parturition (group C). The experiment continued over six lactations and natural infections were monitored clinically, immunologically and microbiologically. After the sixth lactation there were no significant clinical differences between these two groups and group C. The levels of growth-inhibiting antibodies ranged from 1:20 to 1:80 in groups A and B and from 1:40 to 1:160 in group C. The numbers of goats excreting mycoplasmas decreased to a greater extent in group C than in groups A and B. A natural infection induced an outbreak of contagious agalactia in group B. An experimental infection with 10(6) cfe affected seven of 10 goats in group A (two seriously) and two goats in group C moderately. It is recommended that three doses of vaccine should be administered before, and one dose after each parturition, and that the herd should be kept isolated in order to control the disease.