JEFFERSON CITY, Mo. — A factory worker was close to being fired for missing work too much before he pulled a gun in the middle of the plant floor and killed three co-workers, authorities said.

Jonathon Russell, 25, later committed suicide in a gun battle with police outside the police station, investigators said.

Investigators said he may have targeted certain people in the rampage, which followed a shift change at the industrial-radiator factory late Tuesday.

Police said Russell had been accumulating demerits stemming from his absences at Modine Manufacturing Co. and was facing the possible breakup of a romantic relationship.

Two co-workers died along the manufacturing line where Russell had worked for two years. A supervisor, shot 50 feet away, died on the way to the hospital. Five other employees were wounded; their conditions ranged from good to critical.

Sheriff John Hemeyer said co-workers did not recall Russell talking about his personal life. "Prior to the shooting, there was no indication to the employees at Modine that there was anything wrong in his life," Hemeyer.

Hemeyer said Russell bought the Glock .40-caliber pistol in June from a gun shop with a legal permit.

On Tuesday, as the evening shift workers arrived, Russell calmly smoked a cigarette, punched his time card and walked to his work station on a soldering line in the center of the large, open plant. Then he pulled the gun and began firing.

About 140 workers were in the factory, on the western edge of Jefferson City.

Afterward, Russell walked out, drove downtown and parked by the police station, police said.

Two officers confronted Russell, and he fired at them, police said. One of the officers fired back, and Russell started to run off, then stopped and killed himself, police Capt. Jim Johnsen said.

Authorities said they did not know why Russell went to the police station.

Killed were Terry Wilson, 44, Ricky Borts, 29, and supervisor Tim Wilbers, 42. Authorities could not immediately say whether Wilbers had supervised Russell.