Contagious agalactia is a highly infectious disease affecting sheep and goats, mainly caused by Mycoplasma agalactiae. Although various tests are available for diagnosis of contagious agalactia, none of them is credited with the capacity to provide rapid and cost-effective diagnosis. This article reports the development of loop-mediated isothermal amplification (LAMP) test targeting the p40 gene of M. agalactiae, for the diagnosis of classical contagious agalactia. Optimum amplification was obtained at 58 °C in 70 min. The developed test was found to be 100-fold more sensitive than PCR and detected up to 20-fg level of DNA. The test was also superior to conventional PCR in detecting from artificially contaminated milk, i.e. 10(4)-fold more sensitive. The developed LAMP test could detect up to 10 cfu/ml of artificially contaminated milk, indicating its potential for being developed as a field test for rapid and sensitive diagnosis.