Smiling and shackled from waist to feet, Ericka Avery, surprised even the prosecutor on April 23, 2015, when she abruptly admitted to a judge taking part in the gang rape of Hollywood girl in 2013. (Source: CBS4)

Follow CBSMIAMI.COM: Facebook | Twitter

HOLLYWOOD (CBSMiami) — One of five teens accused in connection to the rape and beating of a Hollywood girl has taken a plea deal.

Ericka Avery, 17, was placed back into custody on Tuesday after a judge said she violated her probation when she allegedly sent the victim a message over social media.

On Thursday, Avery, pleaded guilty to armed sexual battery and kidnapping.

Smiling and shackled from waist to feet, Avery surprised even the prosecutor when she abruptly admitted to a judge taking part in the gang rape.

Click here to watch Joan Murray’s report.

“I think she is very remorseful and I think she cant imagine her life turned out this way,” said Avery’s attorney Michael Weinstein. “I am hoping that this is a lesson learned and we’ll never hear from her again”

The judge sentenced her to four years in prison as a youthful offender.

Everyone had expected Avery to attend a hearing on whether to get rid of her bond but her lawyer said he was working against a May deadline on a plea agreement that was offered by the state and they decided not to risk her going to trial and possibly getting a long prison term.

“Hopefully we’ll give a sense of closure to the victim in this case who has been living with this not only with the events that occurred to her but with the backlash because I’ve got to tell you, teens can be very cruel, ” said Prosecutor Maria Schneider.

This is the second teen in the case to plead guilty to the same charges.

On Monday, 17-year old Patricia Montes, took a plea deal from prosecutors, according to the Sun Sentinel.

In exchange for a no contest plea to armed sexual battery and kidnapping, a judge also sentenced Montes to four years in prison as a youthful offender.

As part of the deal, she will also have to testify against Avery, 19-year old Lanel Singleton, 18-year old Dwight Henry and 20-year old Jayvon Woolfork.

Woolfork and Singleton are being held on no bond since they were older than 18 at the time of the incident.

The victim said the beating and rape in 2013 happened at Woolfork’s home on McKinley Street. She said she was hanging out with the teens when they begn to assault her.

The victim told police that Montes, Avery, Dwight Henry and Lanel Singleton dragged her into a room and held her down while Woolfork raped her.

Part of the attack was captured over cell phone video.