A Texas woman was arrested after she claimed her boyfriend was threatening her life on social media — but was actually writing those threatening posts herself, according to police.

Lisa Garcia, 22, was arrested Thursday after cops said she falsely accused her boyfriend, Brandon Berrott, 23, of threatening her, leading police to toss him in jail multiple times, KTRK reported.

Garcia claimed her boyfriend “threatened her life” on social media and through text messages, the Baytown Police Department told Fox News.

POLICE: TEEN ADMITS TO MOLESTING 50 CHILDREN IN CALIFORNIA

Garcia allegedly set up accounts on Instagram pretending to be Berrott, according to the Houston Chronicle. Garcia also sent threatening messages to herself and Berrott’s other girlfriend and reported them to the police department and the Harris County Sheriff’s Office, investigators said.

Berrott reportedly has children with Garcia and the other woman.

Berrott was charged with eight different crimes, according to Fox 26. The charges were filed within 10 days in October, and he was jailed at least three times for Garcia’s threats, the Chronicle reported. It also cost him his job, prosecutors said.

As Berrott was cooperating with police, Garcia was making threats to herself under his name, according to KTRK. Investigators reportedly found that it wasn’t possible for Berrott to have sent one of the threats because he was in custody at the time.

“He didn’t do any of this. He was charged with eight criminal cases and is innocent of all of them,” prosecutor Britni Cooper told the Chronicle. “I’m horrified, actually, and can’t imagine what this guy went through. It’s a nightmare.”

COURT THROWS OUT LAWSUIT OVER TEACHER MOM, 38, JAILED FOR UP TO 30 YEARS FOR SEX AFFAIRS WITH 3 TEEN BOYS

Berrott’s defense attorney, Carl Moore, said he has “never felt so confident that my client was innocent,” and believes Garcia did this because of a custody battle between the two regarding their child.

“She wanted him to revoke his parental rights, and he said, ‘No, I want to be in my child’s life,’“ Moore said. “When you read the messages, I believe you could tell that they were written by a female that was scorned.”

He told KHOU that he blames the police department “as much as anyone for continuing to accept these charges without doing the proper investigation.”

During the course of the investigation, Garcia claimed Berrott’s mother, an employee of Harris County, bribed a state district judge to allow her son to make bail.

Garcia was taken into custody Thursday on charges of retaliation and online impersonation. Bond was set at $10,000.