He lost his job with Bellevue Police and served three stints behind bars. But after a six-month investigation, prosecutors have decided to drop all criminal charges against John Michael Kivlin. They cited "a sophisticated ruse" by the accuser.

"...The case against John Kivlin has been dismissed," wrote a spokesperson for the prosecutor's office responding to an inquiry from KING 5.

The former Bellevue police officer once faced seven criminal counts ranging from violating a protection order, to witness tampering, and assault. They all stemmed from his relationship with a woman who he met on Craiglist.

According to charging documents, last spring the woman told police Kivlin became violent and hit her when she tried to break off their relationship. She also accused him of violating a protection order by repeatedly texting her cell phone.

Last month, prosecutors dropped three of the charges. In a September 4 court filing, prosecutors admitted "...the State conducted a search of the defendant's phone," "...reviewed of the billing records," and determined that "the account set forth…is inaccurate."

A new filing provided to KING 5 Monday revealed why prosecutors dropped the rest of the charges. The investigation revealed "[the woman] fabricated evidence that Kivlin had contacted her in August."

Prosecutors also cited prior false reporting by the woman, including rape allegations in 2009 and 2010 that she eventually admitted were not true.

Prosecutors said while there was evidence Kivlin had violated the protection order in July, proceeding with the case relied on her testimony, which was called into question by her other actions.

In a stunning admission, the prosecutor wrote: "the result of [the woman's] fabrication was that law enforcement arrested Kivlin for crimes he did not commit, prosecutors filed charges against Kivlin for crimes he did not commit, and the Court held Kivlin in custody for order violations which he did not commit."

Kivlin collectively served 49 days behind bars.

"I am happy that the truth came out," said Kivlin's attorney, Jeffrey Cohen. "I'm sorry for my client that it took so long."

Attempts to reach the woman have gone unanswered. Her attorney declined to comment on the case.

The scandal rocked Bellevue Police. Kivlin is one of three members of the department accused of sexual misconduct involving the same woman. One of them is Chief Steve Mylett, who was placed on leave last summer. A source with direct knowledge of the case said the woman accused Mylett and another detective of rape. All of them she claimed to have met online.

According to investigative documents obtained through public disclosure, the detective confirmed with investigators he met the woman online but insisted their sexual contact was consensual.

In an earlier text message conversation with Kivlin, she hinted at Mylett's identity.

"It's your boss boss," she texted Kivlin, according to investigative documents obtained through public disclosure.

"My chief?" Kivlin asked.

"Like Swedish only has one CEO," she wrote.

Chief Mylett vehemently denied knowing who the woman is. With Bothell Police still investigating the allegations against him, Mylett declined further comment. But he told KING 5 in early August, "I never once violated my marriage vows. I would not jeopardize my relationship with my wife nor my children. I would never offend my God."

The prosecutor's office spokesperson confirmed it declined to file charges against that detective. The detective resigned from the Bellevue Police department last week.

Bothell police is handling the criminal investigation against Mylett. The case is still ongoing but according to Captain Mike Johnson, "to date, our detectives are unable to corroborate the complainant's allegations with any independent evidence."