Two people convicted of sexually assaulting a 16-year-old girl while an accomplice filmed and shared the attack on Snapchat were each sentenced to four to five years in prison, the Essex District Attorney announced Friday. 

Rashad Deihim, 21, and Kailyn Bonia, 20, both of Saugus, will also each serve three years of probation after leaving prison. During that period, they’ll be required to wear a GPS device and register as sex offenders. 

They must have no contact with the victim, witnesses or their families, and must also undergo sex offender treatment, submit to mental health evaluations, and remain alcohol and drug free. 

“With this sentence, the Court acknowledges the severity of the crimes perpetrated by these defendants,” District Attorney Jonathan Blodgett said in a statement. “They cruelly attacked a highly intoxicated teenager, who, nevertheless tried to resist them and get away. I hope that she is now able to put this horrific event behind her.”

Delhim was convicted on two counts of assault to rape, four counts of indecent assault and battery, kidnapping and posing a child in the nude. Bonia was convicted of all those charges, but posing a child in the nude. 

Defense attorneys argued during the trial that the attack, which took place near a local elementary school, was a consensual sex act. Prosecutors countered that the then minor victim, now 18, was too drunk to consent.

The girl also reportedly testified that she had little memory of what happened, and woke up in “severe pain” at a hospital the next morning, authorities said. 

Bonia will serve her sentence in Framingham, having received 371 days of credit. Delhim will serve his time at Cedar Junction, and received 395 days of credit.