BAKERSFIELD, Calif. (KGET) — Sheriff’s detectives told Gabriela Martinez they had “overwhelming” evidence she killed her boyfriend the night of Nov. 9.

They had surveillance video showing her waving and pointing a gun while arguing with 37-year-old Kevin Ramirez outside the Rosamond Palms Motel. The video captured what appeared to be a muzzle flash after they walked just south of the motel. Ramirez’s body was found there.

They knew she did it, detectives said. But they had a question: Why?

Martinez, in a lengthy statement contained in reports filed in Superior Court, said Ramirez abused her and, on the night in question, she shot him because she feared for her safety. The documents say she made unusual claims: Ramirez had set her car on fire months earlier but she’d forgiven him; he’d recently confessed to killing his brother; he attacked her and a friend the night of the shooting while armed with a knife.

Later, however, she “completely changed her story” of how the shooting unfolded, investigators said, claiming the gun went off when Ramirez tried to take it from her because he planned on killing himself.

Questioned further, Martinez had trouble answering, or gave vague responses, about the gun used and where she left it, what she wore that evening and why she didn’t call 911, according to the documents.

She told detectives she has a memory disorder.

Martinez, 28, is charged with first-degree murder and held on $1 million bail. She is due back in court Nov. 30.

On the morning of Nov. 10, deputies were called to a man down on the west side of Sierra Highway, south of the motel. The man, identified as Ramirez, had a gunshot wound and was declared dead at the scene.

Detectives spoke with a motel employee who said Ramirez had also worked there, according to the documents. The employee said they were together until about 10 p.m. the night before drinking when Ramirez told him about being assaulted by his girlfriend two days earlier.

The employee identified Martinez as Ramirez’s girlfriend, reports say.

Ramirez said Martinez attacked him, punching him repeatedly until he used pepper spray to stop her, the employee told detectives. Ramirez said Martinez pointed a gun at him during the fight, the employee said.

Investigators obtained motel surveillance video and watched footage showing Ramirez and Martinez arguing outside the motel at about 11:11 p.m., documents said. Ramirez had a gun in her right hand.

“Martinez can be seen waving the black semi-automatic handgun and even points it at (Ramirez),” the documents say.

The two, still arguing, leave by the motel’s main entrance and walk south toward Rosamond Boulevard. They stop at the southeast part of the motel property.

Around 11:30 p.m., the two are still walking back and forth and a muzzle flash is seen, according to the documents. Only one person is seen walking away.

Investigators followed footprints to Roxbury Street, west of a dirt lot where the couple was seen walking in the footage. They spoke with two residents who reported seeing Ramirez and Martinez arguing the night before and later hearing a gunshot, according to the documents.

A man who overheard part of the argument told detectives Ramirez said, “Stay away from me,” and “I don’t want to hit you.” He couldn’t make out what Martinez yelled back. The man said he recognized their voices.

A few minutes later, he heard a gunshot, the man said according to the documents. He told detectives he didn’t check out what happened because he was afraid of being shot.

Deputies arrested Martinez Nov. 14 in Acton.