This is an archived article and the information in the article may be outdated. Please look at the time stamp on the story to see when it was last updated.

YUBA COUNTY —

A Yuba County woman may have saved her life by using Facebook during a fight with her ex-boyfriend, according to sheriff deputies.

After the victim was beaten and sexually assaulted in her Plumas Lake home, she was able to alert police inside a locked bathroom with her tablet computer.

“(I saw) one of the officers taking the woman, who’s just covered in blood, and running her over to the ambulance,” said Chad Shoffner, who lived next door.

The Yuba County Sheriff’s Office said 46-year-old Parrish Heavens attacked his 41-year-old ex-girlfriend in the house they once shared. Deputies said the couple had broken up about a week ago.

But on Thursday night, Heavens entered the garge armed with a knife as the victim was pulling her car in. Deputies told FOX40 he then forced her into her bedroom where he raped her and then cut her face with the knife.

Heavens also cut his own neck during the attack, even puncturing his own throat, according to a statement released by the sheriff’s office.

After the attack, Heavens allegedly locked the victim inside the bedroom and took her cell phone. But deputies said the victim was able to use a tablet computer to post messages on her Facebook account in order to call for help.

The posts were later seen by her “Facebook friends” who called police, according to the sheriff’s office.

Shoffner believed that move saved her life.

“I mean (when she came out of the house) she couldn’t walk. She was definitely bracing herself on the officer,” Shoffner told FOX40.

Heavens was arrested in Sacramento, when deputies said he was checking himself into a hospital for the throat wounds he gave himself.

After he’s medically treated, he will be booked into Yuba County Jail on rape, assault with a deadly weapon and torture charges.

Criminal records show Heavens had a previous arrested, accused of looking up women’s skirts at a Roseville Target in 2013. The sheriff’s office also said the victim actually had a restraining order against Heavens at the time of the attack.