In the present study an automatic algorithm for detection and contouring of multiple sclerosis (MS) lesions in brain magnetic resonance (MR) images is introduced. This algorithm automatically detects MS lesions in axial proton density, T2-weighted, gadolinium enhanced, and fast fluid attenuated inversion recovery (FLAIR) brain MR images. Automated detection consists of three main stages: (1) detection and contouring of all hyperintense signal regions within the image; (2) partial elimination of false positive segments (defined herein as artifacts) by size, shape index, and anatomical location; (3) the use of an artificial neural paradigm (Back-Propagation) for final removal of artifacts by differentiating them from true MS lesions. The algorithm was applied to 45 images acquired from 14 MS patients. The algorithm's sensitivity was 0.87 and the specificity 0.96. In 34 images, 100% of the lesions were detected. The algorithm potentially may serve as a useful preprocessing tool for quantitative MS monitoring via magnetic resonance imaging.