Court documents obtained by our sister station in Los Angeles 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.

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.

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.

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.