Correspondent Erin Moriarty and "48 Hours" investigate the death of a California man and the case against his ex-wife in a rebroadcast of "The Killing of Daniel Green."

It's such a 21st century thing to do and 31-year-old Daniel Green was, after all, a millennial. He was in love and he wanted his friends to know it.

Green had suffered through a tumultuous marriage and a bitter divorce but now he was happy again, so he posted a photograph of himself and his smiling new girlfriend. Days later, he was bombarded with more than 100 texts and calls from his ex-wife Erika Sandoval.

One week after Daniel Green posted this photo featuring his new 20-year-old girlfriend Brenda Vela on Instagram, he was shot dead in his home by his ex-wife. Was the photo the catalyst for the shooting? Tulare County DA's Office

And within a week, Sandoval went into Green's home, ambushed him and shot him dead in his own bathroom. She admitted that to police and at her murder trial.

Police and his family wondered: was the photo a catalyst?

Daniel Green was an Exeter, California, police officer in 2010 when he met and married Erika Sandoval, a 23-year-old aspiring nurse. It was a whirlwind romance that had soaring highs, but also terrible lows when the couple would viciously fight. Daniel's twin brother Matt Green and their younger sister Misty Gray feared that Daniel was being abused by his wife, both psychologically and physically. Sandoval had cut up furniture in a rage and could make their tough brother cry, says Matt Green. "It devastated me to hear my brother crying … and to hear the way she was talking to him. It broke my heart."

I asked Matt Green why his twin brother stayed in the relationship. "As an officer, he would run into women who are abused. Would he not recognize himself in that same situation?" I asked.

Matt Green replied that he thought that Daniel "probably felt like he had nothing he could do about it. You know, that he was maybe trapped in a cycle."

Daniel Green and Erika Sandoval on their wedding day. The couple's relationship was described as "toxic" by family and friends. Irma Sandoval

That cycle continued even after the couple divorced. They would continue to occasionally spend the night together. In the spring of 2012, after Sandoval told friends she was pregnant with Daniel's child, the couple tried to make another go of it. They welcomed their son Aiden into the world in January, 2013. "I don't have any doubt that the day his son was born was the happiest day of his life," Daniel's brother recalls.

Yet, by August of that same year, the relationship once again floundered. Daniel Green confided in friends that he believed Sandoval had cut the brake lines on his motorcycle and that she had once threatened him with his own service weapon. When Sandoval moved out of the couple's home for the last time, taking Aiden with her, the battles revolved around custody issues. Nasty and contentious texts were sent on both sides and are now part of the court record.

In January 2015, they seemed to have ironed out many of their differences and joined the extended family to celebrate Aiden's second birthday. Daniel Green's sister Misty thought the couple might even reconcile. "We thought that Daniel and Erika were getting back together." Misty was wrong. Daniel had actually met someone new, and shortly after that birthday party, posted the picture that announced the new chapter in his life. Less than a month later, he was shot dead.

Accused woman skips pedicure, kills ex-husban...

Erika Sandoval was arrested and charged with his murder. If convicted of first-degree murder, she could face the death penalty.

At her trial this fall, the prosecution, in their opening statements, presented that posted photo of Daniel and his new girlfriend as the prime motive for murder. Erika Sandoval's attorney Dan Chambers, however, turned tables on the prosecution and told jurors that Erika was the one who was abused in her marriage, effectively putting the dead police officer on trial.

Chambers introduced audio tapes of the couple's heated battles, all recorded by Daniel Green. The jury heard Daniel yell profanities and call his ex-wife names. But the most dramatic moment in the trial was when Sandoval herself took the stand and told a story that she had never revealed publicly before: she had gone to her ex-husband's home to snoop and found photos of child pornography. She snapped and shot him — she told the jury—because she feared he might be abusing their son. She offered no proof to back up her story, but her attorney hopes that her testimony and those audio tapes will raise doubts in the jurors' minds.

Erika Sandoval killed Daniel Green. That's not disputed. The question is why? Did Sandoval commit the crime to protect her son? Or was she driven by plain jealousy? Attorney Chambers, hoping to save his client's life, will argue she killed Daniel to protect her son.

Or will the jury believe that a photo of Daniel's new girlfriend on social media was the last straw for Erika? After she was arrested, Sandoval admitted to investigators that she was "bothered" that Daniel was seeing someone else. As she was booked, police searched Erika's purse and discovered a simple yellow Post-it with two notations: the full name and the birth year of the woman in that social media post, Greens' new younger girlfriend.