His arrest must have come as a surprise. The first one, anyhow.

Police told him that he stalked his ex-girlfriend Stephani Lawson, 25.

They told him he violated a restraining order she had taken out against him. They told him he threatened to kill her.

They told him he did all this via Facebook.

From September to December 2015, Tyler Parkervest was arrested four times, all stemming from these claims, the Orange County Register reported. He was charged with multiple felonies, according to a news release from the Orange County District Attorney’s Office.

Which must have been confusing, given that Parkervest didn’t do any of it.

Then, it must have been frightening when his bail was raised to $200,000 last December and to pay it his grandparents had to offer their home in Irvine, Calif., as collateral.

Finally, police caught on.

From the beginning, Lawson had been alerting police to Parkervest’s “crimes.” She filed eight police reports against him, claiming that he would drive by her home and that he threatened to kill not only her but her young daughter as well.

“Lawson alleged that the threats came from a Facebook account named ‘Tyler Parker,’” Orange County District Attorney investigator Loren Dawson said.

Eventually, police discovered that the account didn’t belong to Parkervest, although it bore his likeness. Lawson had created it in a (mostly successful) attempt to frame her former boyfriend.

On Wednesday, Lawson was convicted and sentenced to one year in jail after she “pleaded guilty to one felony count of false imprisonment by menace, violence, fraud, or deceit, and one felony count of perjury,” according to a statement from the Orange County District Attorney.

Police grew suspicious of Lawson in May, when she testified during a preliminary hearing about some of the messages Parkervest had supposedly sent to her — including one that made a particularly horrific claim.

“The Facebook messages threatened Lawson from testifying in court and one message stated a friend had fun raping Lawson’s daughter,” Dawson said.

But when she displayed images of the messages, some grew suspicious.

“One of my DA colleagues looked at it and said it doesn’t look right, and that triggered in our mind maybe we need to look into this further,” Deputy District Attorney Mark Geller told the City News Service.

So they opened a follow-up investigation of these statements, obtaining search warrants for Facebook and T-Mobile records.

Although they began the investigation in May, it took all summer to access the records because the tech companies kept “kicking back” warrants, Geller said.

“We had to go around and around with them all summer until we got the documents we needed,” he told the City News Service.

Finally, they received the records showing that Lawson wasn’t the victim. The threats had come from her devices.

She was the perpetrator.

“The T-Mobile records showed that Lawson disguised herself as Parkervest with a similar Facebook account,” Dawson said. “Lawson sent herself numerous criminal threats from the phony ‘Tyler Parker’ Facebook account and reported to law enforcement that Parkervest sent her the messages. Lawson had Parkervest arrested four times for crimes that he did not commit.”

She was arrested on Sept. 28 in her home town of Las Vegas, and charges against Parkervest were dropped on Oct. 6, according to the Orange County district attorney.

Though the charges against Parkervest were eventually dropped, his story concluded with a sad coda. His grandparents, the same ones who offered their home as collateral for bail, attended each one of his court hearings.

There were many.

But his grandmother died before he was exonerated.

After his release, Parkervest moved to Texas with his grandfather.

More from Morning Mix

22 heavily armed men post mannequin challenge on Facebook, much to delight of cops

Rashaan Salaam, 1994 Heisman Trophy winner, found dead in Boulder park. He left a note.