Michelle Hadley stood out like a sore thumb.

When she arrived at the Orange County Central Women's Jail, the first question she had was, "Is there coffee in jail?"

Her parents Michael and Suzanne tried to understand how their bright and imaginative daughter could end up behind bars. She was charged with stalking, criminal threats, and attempted rape. Her possible sentence: life in prison.

Did they miss something?

Anaheim police said the target of Michelle's crimes was a woman named Angela Diaz. Angela had recently married Michelle's former fiancé, Ian Diaz, a US Marshal. Michelle and Ian had broken up months earlier, but they were still tied together by a condo they owned in Anaheim. Michelle and Ian fought about the condo over email.

Watch the full story Friday at 10/9c on Dateline NBC

In September 2015, Michelle sent Ian an email laced with biblical language: "Please explain to your Real Estate attorney that God's law is above all laws, including the Law of Man. Lilith, you may try to hide behind the Law of Man, but it is a weak shield that will bend and crack against the Sword of God."

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Both hired lawyers. It was a tense time for the former couple. But then, in May 2016, Ian's new wife Angela, who had recently announced she was pregnant, began receiving emails too - threatening and mean. At first, they were sent anonymously. But then, they appeared to be sent from Michelle, using similar religiously-themed language.

"I hope you are scared of death tomorrow. Be prepared. Don't sleep, be watchful of the Daughters of God," one email said. "We will steal your child and we will watch as it dies."

Michelle Suzanne Hadley after being cleared of all charges. AP

Angela filed for a restraining order against Michelle. A judge granted it and ordered Michelle to stop contacting Angela. But the emails continued - and became even more threatening.

June 6, 2016: "You will pay for this. I hope to God you are ready for the pain I will show you."

Then this: "Burn in the fiery pits of hell tonight, as by God's law. You will be hurt."

Two weeks later, police arrested Michelle for violating the restraining order. Her parents bailed her out.

But it got worse. In a twisted game, someone was responding to Craigslist "Rape Fantasy" ads -- men looking for violent sexual encounters. One response to the ad said: "I am dying for this kind of fantasy to come true. Pull me down, choke and bruise me, have your way with me." The address? The Anaheim condo where Ian and Angela now lived.

Angela said men were showing up at her home. She said one attacked her but she managed to fight him off. She was terrified. Anaheim police stepped in and Michelle was arrested again in July 2016.

Days turned into weeks. Weeks into months. Michelle adjusted to the sounds of jail. The shrieks of the other women. The 4:30 a.m. wake up. The instant coffee. And the death threat she received when her story hit the newspaper.

Her parents could either bail her out, or spend their money on a defense attorney. They gambled on attorney Michael Guisti. Together, they studied the timing of the emails, became experts at computer forensics, and came to a shocking realization. Michelle was being framed. Police and prosecutors came to the same conclusion.

On January 9, 2017, District Attorney Tony Rackaukas called a press conference. "When someone who is innocent gets arrested and charged with some crime, that's not just a bad day, it's a nightmare." He continued, "Ms. Hadley is an innocent victim of a diabolical scheme."

The charges against Michelle were dismissed later that day.

"This has been a huge nightmare for me. Probably the most traumatic experience of my life," said Michelle, standing on the steps outside an Orange County courthouse.

That was the last we heard from Michelle Hadley - until now.

Michelle sat down exclusively with Dateline NBC. Her story - unbelievable. The plot - diabolical. And the person prosecutors now believe was behind it - that's the most stunning revelation of all.

Watch "Dateline NBC: Diabolical" Friday at 10pm Eastern/Pacific or 9pm Central on NBC.