COLUMBIA, S.C. -- A mother who police say killed her two children and herself had shot and killed another woman hours earlier at the South Carolina apartments where her estranged husband lived, authorities said.

Jessica Edens was involved in a custody dispute over one of the children with her estranged husband and complained to an officer who came to her Easley home the day before the shootings that he had an affair for the past year, according to a police report.

The other woman killed had reported receiving harassing text messages and phone calls from Edens in the weeks before the shooting, Greenville Police Chief Ken Miller said Friday.

Get Breaking News Delivered to Your Inbox

Meredith Rahme, 28, was shot in her car around 5 p.m. Thursday by Edens in downtown Greenville, Miller said at a news conference.

Jessica Edens, left, and her son Hayden WSPA

He added that the 36-year-old shooter's 9-year-old son and 5-year-old daughter were in the back of her SUV at the time.

Two hours later and about 7 miles away, deputies found the SUV locked and running with Edens and the two children inside, each dead from a single shot to the head or neck, Pickens County Chief Deputy Creed Hashe said. Investigators believe Edens killed the two children before turning the gun on herself, reports CBS affiliate WSPA.

A .40-caliber handgun was found inside the SUV. A similar gun was used to kill Rahme, authorities said.

Rahme had called police twice less than three weeks ago to ask how she could deal with harassing text messages, phone calls and online postings from Edens, Miller said.

Edens' estranged husband had called Easley police on Wednesday to ask them to check on their daughter shortly after he received a disturbing text message from Edens and the two had been in court to discuss custody of the 5-year-old girl, authorities said. WSPA reports the estranged husband is the father of one of Edens' children.

The officer who went to the home found the family planning to eat popcorn and watch a movie. One of the children was speaking to the husband, according to the police report.

The officer asked Edens if there was any chance she could get back with her husband and she said instead she was going to expose his yearlong affair in court, the police report said.

Rahme worked with Edens' husband, Miller said. He refused to give any other details about their relationship. WSPA reports investigators believe the violence stemmed from a domestic altercation amid the breakup of Edens' marriage.

Miller said authorities had no indication before the shooting that Edens was planning violence.

"There is some indication that about the time of the custody decision that she had some sense of inflicting violence either on the children or on herself or both. But that wasn't discovered until after she was discovered last night," Miller said.

Greenville investigators are trying to determine if Edens was waiting on Rahme or followed her into the parking garage under the apartments. Rahme was found dead in the driver's seat of her car, authorities said.

Miller said the tragedy of the shooting touched several families.

"It is important to remember there are fathers who have lost children to this senseless violence and our heart goes out to them," Miller said.

Hayden King was a rising fourth-grade student at Forest Acres Elementary School where his little sister was expected to start school later this year, reports WSPA.

"We are deeply saddened to hear of the tragic incident that took the life of one of our students. Hayden always had a smile for his teachers and friends," Forest Acres principal Darian Byrd said in a statement released to WSPA. "He will be remembered as a happy, caring child who was full of joy. We were looking forward to serving his younger sister, Harper, in Kindergarten in August."