SANDY — Social media posts from the gunman who killed a mother and her 6-year-old son and also shot two other children reveal that he made threats toward the woman for keeping their relationship a secret.

In private Instagram posts in the two days leading up to the violent shootings Tuesday near a Sandy elementary school, Jeremy Patterson, 32, wrote that the woman, who was no longer dating him, had hidden their relationship and attempted to "control" him after they broke up.

In a caption for a meme posted on the day of the shootings showing a grinning child who won't reveal a secret, Patterson wrote:

"How can you love someone so much and keep you such a secret?? After 6 months, I never met her friends, family or kids!!! I don't think anyone deserves to be kept a secret. I love Memorez Rackley and she's never been a secret in my life!"

Another post, written Monday, includes a picture of a character from the "Saw" horror films, with the words "Let the games begin." In his caption, Patterson wrote: "My ex thinks she can control even when we aren't together!!!!" followed by an expletive and the words, "Let the games begin … " with another expletive.

Police are considering the social media posts as they work to piece together details of what led up to the devastating shootings.

Sandy Police Sgt. James Nielsen said Wednesday that Patterson had some kind of a relationship with Rackley, but he was not the father of any of her children. Sandy police were contacted about another incident involving Patterson over the weekend.

At 2:34 a.m. on Saturday, Rackley called police to report that Patterson was harassing her by telephone, according to Nielsen. At Rackley's request, police talked to Patterson and asked him to stop contacting her. The sergeant declined to provide more information about that incident.

Three days later, Patterson shot Rackley, her 6-year-old son Jase, her 11-year-old son Myles, and an 8-year-old girl who were all heading home from school. Patterson then shot and killed himself. Rackley and her kindergartener son died at the scene. The other two children were hospitalized.

Neilsen called the deadly attack rare for the Sandy neighborhood.

"It's tragic in every aspect you could possibly look at," Nielsen said. "There's nothing good that has come out or will come out of this case."

Rackley, 39, was walking home with her two youngest boys from school Tuesday., joining many other parents and students heading home from classes at Brookwood Elementary School. Though her home was only about a block away, neighbors said Patterson did something to frighten Rackley to the point that she flagged down a driver for help.

"(Rackley) comes running over to (the driver) saying, 'This man's stalking me, can you help me? Can you give me a ride?" said Kathy Peterson, who lives near the scene of the shootings.

The driver told Peterson that moments after Rackley and her sons climbed into her SUV, Patterson arrived and rammed the SUV with his truck near the corner of Alta Canyon Drive (8645 South) and Snowville Drive (2230 East), immobilizing the vehicle.

Police say he then jumped out and opened fire.

Terrified, the driver — who the Rackley family would come to call the "good Samaritan" — and three children she had been taking home with her ran to Peterson's home, pounding on the door.

"I ran to the door and there's these three little girls, one of them is covered in blood, and this woman is hysterical," Peterson recalled. "The woman was screaming, 'He's going to kill us all!'"

As she hurried them inside, Peterson said she began praying and felt a calm feeling come over the group.

"They were just so scared," she said. "They wanted to be in the safest place. We went into my kitchen where there's a high window. They didn't want to be anywhere near windows. They really thought that man was going to come kill them all."

In Peterson's house, it was discovered the driver's 8-year-old girl had also been shot. When EMTs arrived to take her and her mother to a hospital, Peterson said the other two girls from the driver's carpool stayed hidden in her home with her for more than an hour. To comfort the girls, Peterson said she gave the children teddy bears and said prayers with them.

The shootings sent the quiet Sandy neighborhood into chaos, with other parents and children scrambling for cover and strangers rushing to take them in.

Emily Loveland's 10-year-old son was walking home from school when he called to tell his mom something was happening. As she went out to meet him, Loveland said she realized there had been a shooting and began hurrying nearby children and some parents into her home.

Moments later, a friend arrived with her own children and another group she had piled into the back of her SUV before rushing to the nearest home she knew.

"I bet we had 15 kids in there," Loveland said. "We just got them inside, locked the doors — tried to, you know, get a show on and get them a treat and try and get them all calmed down until we could get ahold of their parents."

Once the scene was cleared, Loveland said she and her friend took the children along a back road to meet their parents back at the school.

"I think it's a motherly instinct and you kind of forget about your own safety and you just want to make sure that your children and everyone else's children are somewhere safe," Loveland said. "I feel very strongly that anyone would have done the same thing for my child."

Police said Myles remained hospitalized in critical condition Wednesday but had stabilized. According to neighbors, the 8-year-old girl was released from the hospital Wednesday.

Though Patterson is dead and no suspects remain in the case, Nielsen said detectives will thoroughly investigate the shooting, in part to answer questions and give closure to the Rackley family and the family of the good Samaritan.

"We will go through everything and finalize every detail and get the families the answers as soon as we can, but we're not going to make it fast. It's going to take a little time because we need to make sure we get it right," Nielsen said.

A search of Utah State Court records shows no prior criminal history or protective orders against Patterson.

In a brief statement released Wednesday, the Rackley family spoke of both their grief following the shootings and appreciation for those who helped them in the chaos afterward.

"Our family is heartbroken by the events of yesterday. We are focusing on supporting our injured son in his recovery," the statement says. "We are grateful to the good Samaritan that stopped to help our family, and our thoughts are also with their daughter who was injured. At this time we appreciate the prayers of so many."

The family also said those wishing to contribute to memorials for the mother and her young son may do so through the Rackley Memorial Fund at Mountain America Credit Union.

Additionally, a GoFundMe campaign established late Tuesday had raised more than $19,000 by Wednesday night.

Help for people in abusive relationships can be found by contacting the YWCA's Women in Jeopardy program at 801-537-8600, or the statewide Domestic Violence Hotline at 800-897-LINK (5465).

Contributing: Ladd Egan