Assessment of locomotion following exposure of animals to noxious or painful stimuli can offer significant insights into underlying mechanisms of injury and the effectiveness of various treatments. We developed a novel method to track the movement of mice in two dimensions using computer vision and neural network algorithms. By using this system we demonstrated that mice exposed to chlorine (Cl 2) gas developed impaired locomotion and increased immobility for up to 9 h postexposure. Postexposure administration of buprenorphine, a common analgesic agent, increased locomotion and decreased immobility times in Cl 2- but not air-exposed mice, most likely by decreasing Cl 2-induced pain. This method can be adapted to assess the effectiveness of various therapies following exposure to a variety of chemical and behavioral noxious stimuli. Copyright © 2012 the American Physiological Society.