GRESHAM, Ore. (AP) — An Oregon mother fatally shot her children, ages 6 and 8, before killing herself, police said, and court documents show the woman was headed to trial next month in a bitter and lengthy custody dispute with her ex-partner.

The mother who killed herself, Ashley Palmer, 31, had petitioned the court at least twice on an emergency basis for full custody of the children, citing her ex-partner’s instability and a gun in the home, and said she herself had financial problems and mounting debt, according to court documents.

Her ex-partner, Jenavie Palmer, was scheduled to get the children on Tuesday, the day they were found dead, after several weeks without a visit.

Also read | Two back-to-back Chicago shootings leave one dead, 10 injured

Just hours before the apparent murder-suicide, Ashley Palmer texted Jenavie Palmer late Monday night a YouTube link to a music playlist labeled with the words “mother children murder suicide 2022,” The Oregonian/OregonLive reported.

Jenavie Palmer called 911 and police responded to the apartment but didn’t get in and told her to check back in the morning.

Ashley Palmer’s mother also called police to ask them to check on her daughter and grandchildren, Jenavie Palmer told the newspaper.

Also read | Off-duty NYPD cop kills man, himself outside Buffalo Wild Wings in Walkill

On Tuesday morning at about 7:45 a.m., officers and the East County Major Crimes Team found three people dead in an apartment, the Gresham Police Department said in a news release.

After investigation and autopsies, police said it was determined that Ashley Palmer and the children died from gunshot wounds in a murder suicide.

The children were identified by the newspaper as Kayleana Beatrice Palmer, 6, and Xavier Rayvaughn Danger Palmer, 8.

Jenavie Palmer, who is also identified as Christofer Palmer in court papers, told the newspaper that the two parents were divorced in 2020 and were in a “pretty bad” custody dispute.

Also read | Alabama prison official and inmate she helped escape arrested in Indiana

“We were in the middle of trial and the children were going back and forth between our houses,” said Jenavie Palmer, 34, of Portland.

Ashley Palmer was facing the prospect of having to share custody of the children, she said.

“They were loved,” Jenavie Palmer said. “They had their whole lives ahead of them and it was stolen from them. They are going to be very, very missed.”