A Jackson Heights woman dodged over two decades in prison on Monday when a jury acquitted of the top charge for slicing her lover’s right arm with a samurai sword.

A Queens jury determined that Karla Barba was not guilty of first-degree assault and first-degree attempted assault charges that would have sent her to an upstate prison for up to 25 years. She was, however, convicted of second-degree assault and two counts of endangering the welfare of a child and faces up to 7 years behind bars.

“I consider it a victory for Karla because she was found not guilty on the top count,” said Barba’s attorney Stacey Richman. “I believe Karla is factually innocent, but the jury saw it the way they did.”

Barba, 40, testified in her own defense during the two-week trial that she did not intentionally pick up the sharp sword to harm Franklin Larrea away during a domestic dispute.

Larrea suffered two deep cuts to his right forearm and wrist that required an emergency blood transfusion to keep him alive, according to trial testimony.

“This was an horrific attack and it is amazing the victim survived. The walls and doors of the apartment were splattered with blood and the floors covered in puddles of blood,” said Queens District Richard A. Brown. “The defendant called the incident an accident. The jury, however, thought differently and after weighing all the evidence, convicted the woman of assault. The defendant now faces a lengthy term of incarceration.”

Prosecutor Mary Kate Quinn failed to convince the jurors that Barba and Larrea — who testified in Barba’s defense — were not truthful during their testimony and were protecting each other.

“I don’t want to talk about it,” said Larrea after the verdict was read.

Though Barba was compliant with her $100,000 bail conditions since her arrest in June 2016, Queens Supreme Court Justice Deborah Stevens Modica revoked her bond and remanded her to Rikers Island pending her sentencing on Feb. 21.

“Por qué?” said an unidentified relative in the courtroom as the court officers handcuffed Barba.

Barba begged to speak to her family in the gallery before she was transferred to jail but was denied.

“She didn’t do it on purpose. It was an accident,” another sister told the Eagle in Spanish outside of court.

“The judge could have kept her out,” Richman said.

Modica reiterated the full order of protection Barba has in favor of Larrea, their 4-year-old daughter and his 15-year-old son unless permitted by a Family Court order.