BILLINGS, Mont. (AP) — A Montana man connected to a casino shooting that left three people dead had a long criminal history and was being sought by police before the attack, according to public records and court documents filed Wednesday.

Deputy U.S. marshals shot and killed 41-year-old Ricky Lee Gardipee early Tuesday in the city of Great Falls, about a mile away from the Emerald City Casino where three people were killed and a fourth was wounded, a coroner said.

Police have not released a motive for the slayings, which they believe Gardipee carried out.

He was involved in a robbery on the same night, but it was unclear if the target was the casino, according to court documents filed in a related criminal case against one of Gardipee’s associates.

Gardipee’s criminal record includes convictions for assaulting a police officer, robbery, forgery, theft, burglary, drug possession and criminal possession of dangerous drugs, according to the Montana Department of Corrections.

Gardipee was released from prison in May. He was facing a new allegation of probation violations following a November arrest on possession of heroin and methamphetamine, according to court records.

The Great Falls Tribune reports that Gardipee also was wanted for misdemeanor assault at the time of the shooting, which occurred about 2 a.m. Tuesday in the casino along one of the city’s main commercial strips.

He was fatally shot about three hours later behind an elementary school.

Police found the three bodies inside the casino when they arrived. The victims were 53-year-old Cheryl Ann Larsen, 60-year-old Wendy Joanne Carlson and 61-year-old Steve Mitchell Hale.

A fourth person with a gunshot wound showed up at a hospital and was in stable condition as of Wednesday.

Federal, state and local authorities searched for the shooter across the city and found the suspect near the school in a neighborhood, officials said.

Gardipee was fatally shot after “engaging law enforcement,” Great Falls police Capt. Jeff Newton said. He did not elaborate.

Two others face charges in connection with the case and made initial court appearances Wednesday, including a woman accused of harboring Gardipee and who was with him just before the shooting.

More From KBUL NEWS TALK 970 AM & 103.3 FM