Authorities say a California woman begged a judge to evict her tenant, just days before she recorded her own murder.

Prosecutors released a recording Friday that police found at the crime scene, made by a person who is believed to be the victim before she was murdered. The release took place at a preliminary trial hearing for defendant Scott Pettigrew, who is accused of murdering Mimie Anita Cowen in Palm Springs last June, WTSP reported.

“It was a recording of what I believe took place that night,” said Detective Heather Olsen, who testified at the hearing.

The recording starts out with a woman shouting, and a hard-to-decipher voice that police say is Pettigrew’s in the background.

“Stay away from me!” the woman yells in the recording. “You bastard! You bastard! You bastard!”

“Get out of here! Get out of here! Get off me!” she yells before the recording ends.

Before Cowen, 65, was murdered, she asked a county judge to evict her tenant, Scott Pettigrew, for what she said was problematic behavior, the Desert Sun reported.

Cowen claimed that Pettigrew failed to pay rent, stole silverware, damaged her computer, took the batteries out of her phones, and let his dogs defecate in the house because he failed to let them out.

When she confronted him, Cowen claimed that Pettigrew threatened her.

“I am being terrorized daily in my own home,” Cowen said. “Escalating each day. I need help. I need a restraining order.”

Superior Court Judge James Cox granted an eviction, but not one that would allow her to evict her tenant completely.

Judge Cox ordered that Pettigrew’s dogs be removed from the house, but allowed Pettigrew to continue living in the house so long as he stayed five yards away from Cowen at all times.

He also said that Pettigrew and Cowen could work out their differences at a court hearing in two weeks.

Police found Cowen dead, face down in a pool, four days later.

Cowen is not the first woman to record her murder.

Fox News reported that a Pennsylvania woman recorded her own killing with her iPhone in May 2016.

Photo: file