SAN BERNARDINO, Calif. (KABC) -- Court documents obtained by Eyewitness News involving two women connected to the San Bernardino school gunman reveal a troubled romantic past.
Lincoln Cooper recalled that two weeks ago while he was putting gas in his car that he was approached by Cedric Anderson, 53, who is accused of killing his estranged wife, Karen Elaine Smith, and a student at North Park Elementary School.
MORE: Parents release photo of 9-year-old recovering after San Bernardino school shooting
Cooper said it was a hat he was wearing that caught Anderson's attention.
"So he said, 'Oh, you love Jesus'...I said, 'Yes, I do.' He said, 'I need to talk to you,'" Cooper said.
In their first encounter, Cooper said Anderson told him about his troubled marriage and frustration with his wife's family, who he blamed for their separation.
"He mentioned about killing. He said, 'I wish I could kill them.' Not her, but the family," Cooper said.
The two talked for several minutes before Cooper invited him to his Perris ministry, The Concerned Family. There, Anderson met Cooper's wife.
"He said, 'I never did anything to her. I was trying to tell her not to take the side of her family and then I just touched her on the chest. But I did not do anything. Then she turned around and said I choked her,'" Fortunate Cooper said.
MORE: In wake of San Bernardino school tragedy, community holds vigil
She said that conversation sent up red flags. But the Coopers felt compelled to minister and try to help Anderson. What they didn't know were previous abuse allegations against Anderson.
In one of the court documents, a live-in girlfriend accused Anderson of trying to suffocate her with a pillow and threatening her with a butcher knife.
The woman was able to obtain a restraining order against Anderson in 2013 and it expired last June.
In 1997, Anderson's wife at the time also got a protection order for herself and their three children, accusing Anderson of threatening to kidnap their children and kill her.
Anderson then met Smith in 2013. They had an ongoing relationship for four years before marrying in January. But the couple became estranged a few months into the marriage.
Smith had been private about their marriage, telling only a few close family members about turmoil in the relationship, including Anderson accusing Smith of infidelity.
On Monday, Anderson headed to North Park Elementary School where Smith worked as a special needs teacher and opened fire, killing her and an 8-year-old student who was near her. A 9-year-old student was wounded and is recovering at a local hospital.
Anderson then reloaded his revolver and killed himself, authorities said.
The student who was killed, Jonathan Martinez, had Williams syndrome and died after being airlifted to a hospital.
MORE: Family shares photos of 8-year-old slain in San Bernardino school shooting
Investigators were told by Smith's daughter that Anderson had made threats in the past, but that her mother had not taken them seriously, believing they were efforts to gain attention.
Anderson also had four previous arrests, dating from 1982 to 2013, for a weapons violation, domestic violence and theft, but he was never convicted of those charges.
Cooper said the man he and his wife met seemed troubled and in need of help.
"She was staying with her mother and he wanted her back and he indicated that he couldn't concentrate," Cooper said.
He added that he last spoke to Anderson on April 3 and regrets not reaching out to him in an attempt to talk to him more.