A man who shot and killed three people and a dog before turning the gun on himself in Canton bought the gun legally an hour before he opened fire on Thursday, police reported.

Tres Peterson, 21, killed his ex-fiancee and two other people — including her mother — who lived in the Smith Avenue Northwest home.

The victims were Cheyenne Calderon, 20, her mother Kelly Freshour, 50, and her mother’s friend Timothy Keyser, 70. The family’s Siberian husky was killed, too, while a family friend escaped with Calderon’s 3-year-old son.

According to police, Peterson arrived at the home shortly before 1:30 p.m. and entered through an unlocked door. He shot the dog in the kitchen and pursued Calderon through the home while firing shots. She fled into a first-floor bedroom, where Freshour and Keyser were located, and that’s where Peterson killed the three of them.

He then went to the dining room and killed himself, police reported.

While Peterson was opening fire, the family friend who survived was in the living room. He grabbed Calderon’s son and fled, both of them unharmed.

Peterson lived in the home for a few months until he and Calderon ended their relationship about a week ago, police said. He bought the handgun legally at a Belden Village store in Jackson Township. In total, Peterson fired 14 times.

Canton Police Capt. David Kurzinsky said this sort of crime is unheard of in the city.

“I don’t recall anything like this ever happening here,” he said.