A woman framed her husband's ex-fiancee as a menacing stalker and succeeded in having her jailed for nearly three months through a 'diabolical scheme', according to a district attorney in California.

Angela Maria Diaz, 31, sent herself threatening emails, pretended she was pregnant, made false police reports, faked a crime scene and posed as the victim of a 'rape fantasy' ad on Craigslist, according to Orange County District Attorney Tony Rackauckas.

The elaborate plot led police to believe 30-year-old Michelle Suzanne Hadley would eventually cause Diaz's rape or death - and Hadley was arrested in July for several felonies, for which she could have faced a maximum sentence of life in prison.

But it was revealed that Diaz set Hadley up, and the 30-year-old was released in October and exonerated, according to a press release issued by Rackauckas on Monday.

Deputy District Attorney Richard Zimmer told Dailymail.com: 'This is actually one of the most unusual things I've seen in my career. The amount of planning, the effort, the sophistication, the amount of time that went into framing Ms. Hadley was incredible.'

Diaz now faces a number of felonies including kidnapping, false imprisonment and filing false police reports.

Scroll down for video

Michelle Suzanne Hadley (left) was framed as a menacing stalker by Angela Maria Diaz (right), who succeeded in having her jailed for nearly three months

Hadley (left) first dated a 39-year-old Deputy US Marshal identified as 'John Doe' from 2013 to 2015. They broke up, and Doe ended up marrying Diaz (right) after two months of dating

Hadley started dating a 39-year-old Deputy US Marshal identified only as 'John Doe' in August 2013.

They bought a condo and got engaged during their 'whirlwind romance' until Hadley and Doe broke up in August 2015, according to Rackauckas.

In the months following their breakup, Hadley wrote Doe emails, some of which included religious language, according to Rackauckas. The two ceased contact in the fall of 2015.

In January 2016, Doe met Diaz on a dating website and the two were married within two months.

After moving in together, Diaz lied in May 2016 and told Doe she was pregnant before launching her elaborate scheme to frame Hadley.

On June 1, Diaz, along with her new husband, appeared at the Anaheim Police Department, where she reported that Hadley had sent her a number of threatening emails.

It turned out that Diaz sent the emails to herself, using Virtual Private Networks and third-party proxy servers to disguise her Internet Protocol (IP) address, according to Rackauckas.

Diaz gave the police copies of the fake emails, some of which she doctored to appear as if they were sent from Hadley's real email address, Zimmer said.

After Diaz wrote hundreds of fake emails, which she pinned on Hadley, she claimed she was the victim of a 'rape fantasy' Craigslist ad she claimed was set up by Hadley. Pictured, Diaz (left and right, with red marks around her neck) after she told police a man tried to rape her

She pointed out where her 'attacker' slammed her face into the wall (above), and showed police her ripped shirt. But Zimmer said: 'We believe that whole crime scene was staged and that she did that to herself'

The hundreds of fake emails, which Diaz pinned on Hadley, included threats to have Diaz raped and killed, in addition to threats to her fake, unborn child, according to Zimmer.

The phony emails also included disturbing images of decapitated bodies, aborted fetuses and dead women, Zimmer said.

Diaz also fooled authorities by using religious language that mirrored the contents of Hadley's correspondence with Doe shortly after they broke up, Zimmer said.

Zimmer told Dailymail.com: 'There were no threats from Hadley to Doe. But Diaz took the religious language and turned it into more threatening language.

The fake emails written by Diaz included mentions of God, Satan, and phrases like 'God knows the truth' or 'You'll suffer God's judgement', according to Zimmer.

Diaz was granted a Temporary Restraining Order against Hadley after making several false reports about ongoing threats.

The situation escalated when Diaz claimed she was the victim of a 'rape fantasy' Craigslist ad she claimed was set up by Hadley.

Hadley (pictured left and right) was first arrested on June 24, 2016, and bailed out the next day. After Diaz reported another incident involving the rape fantasy ad, Hadley was jailed from July 13 to October 7

She told police Hadley had impersonated her and responded to advertisements on Craigslist saying she wanted to act out her 'rape fantasies'.

In reality, Diaz posted an advertisement herself. She told responding men that she wanted to have forced sex even if she screamed or resisted, and sent out photos of herself, along with details of her daily routine, according to Rackauckas.

The ad, which Diaz claimed was the work of Hadley, attracted at least two men who intended to travel to Diaz's home in Anaheim before they were intercepted by police.

On June 24, 2016, Diaz called 911, saying a man tried to rape her in the garage of her home - but that turned out to be another one of Diaz's lies, Zimmer said.

She pointed out where her 'attacker' slammed her face into the wall, and showed police a ripped shirt, along with an abrasion on her head and red marks on her neck.

Zimmer told Dailymail.com: 'We believe that whole crime scene was staged and that she did that to herself.'

But police at the time believed her story, and Hadley was arrested later that evening before she was released the next day on $100,000 bail.

Diaz claimed the threatening emails and responses to the rape fantasy ad ceased while Hadley was in jail and started up again after she was bailed out, incriminating Hadley further.

Weeks later on July 13, Diaz called 911 again and police arrived to find a 17-year-old boy outside her home who was responding to the rape fantasy ad.

'Due to the seriousness of the threats, the alleged attack on Diaz in her garage, the escalation in both the frequency and nature of the threats, and yet another man arriving at Diaz's residence to engage in a rape fantasy encounter, law enforcement believed a serious threat to public safety existed', according to the press release issued by Rackauckas.

A warrant was issued for Hadley's arrest, and she was charged with stalking, criminal threats, attempted rape, assault with intent to commit rape during a residential burglary, violating a protective order and a crime-bail-crime enhancement.

Hadley was held from July 14 until October 7 on $1million bail.

Diaz called 911 again on July 13, and police arrived to find a 17-year-old boy outside her home who was responding to the rape fantasy ad. A warrant was issued for Hadley's arrest, and she was charged with felonies that carried a maximum sentence of life in prison

Investigators finally tracked down the IP addresses of the threatening emails, and found they emerged from Diaz's own home, cell phone and her father's home in Arizona. Hadley has been exonerated and Diaz is now in custody

Zimmer told Dailymail.com: 'The aha moment came after we spent a few months trying to unwind the third party proxy servers.'

He said: 'When we did that, we started getting IP addresses to Diaz's condo and her father's apartment. One came back to her cell phone.'

Further investigation also revealed Diaz's history of fraud, which included altering a paycheck from her employer to add $2,000, telling her previous boyfriend she had cervical cancer, pretending to be an attorney, forging doctor's notes and impersonating two of her husband's ex-girlfriends through email in addition to her fake pregnancy.

Zimmer told Dailymail.com: ' This is actually one of the most unusual things I've seen in my career. The amount of planning, the effort, the sophistication, the amount of time that went into framing Ms Hadley was incredible.

'This was an ongoing thing, with emails coming in morning, noon and night.

'Thankfully this is very rare, but it certainly made me sick to my stomach to realize we probably had the wrong person in jail.

'That's certainly not something we want to have happen so we worked as fast as we could to clear Ms Hadley's name and reputation.'

Zimmer told Dailymail.com: 'it certainly made me sick to my stomach to realize we probably had the wrong person in jail' Pictured, Hadley outside Orange County Superior Court on January 9, 2016

Hadley, who smiled and held back tears as she called it 'the most traumatic experience of my life' is now looking to finish her MBA at Chapman University

Pictured, Hadley hugging Orange County Distrct ATtorney Chief of Staff Susan Schroeder after being cleared of all charges

Rackauckas said: 'As important as the filing of charges against Ms. Diaz, is the dismissal of the previous complaint and full exoneration of Michelle Hadley.

'This is a very detailed case. I wanted to make sure, however, that Ms. Hadley is cleared in every possible way – in the courtroom and in the court of public opinion.

'It should be clear in the media and in cyberspace. Ms. Hadley is an innocent victim of a diabolical scheme.'

Hadley, who called it 'the most traumatic experience of my life' is now looking to finish her MBA at Chapman University.

Diaz is in custody in Arizona, and is expected to be extradited to California in the next week before she will be arraigned, Zimmer said.

He said Diaz and Doe are in the process of getting a divorce.