BUFFALO, N.Y. (WIVB) — After a vicious gang rape on Buffalo’s east side in 2014, the men being held responsible will spend time behind bars.

Prosecutors revealed details into the case in January after three men pleaded guilty to raping a Buffalo woman for hours. Daqwan Morris, 19, Shameek Young, 18, and another 18-year-old who has since been granted youthful offender status, each pleaded guilty to violent sexual felonies.

Morris and Young faced the most serious crimes, and could have spent up to 40 years behind bars after sentencing, the District Attorney’s Office said. After sentencing on Monday, officials said Morris will spend seven years behind bars and Young will spend nine years behind bars. Each will serve seven years of post-release supervision.

The decision to grant the third 18-year-old youthful offender status means his case will be sealed from public record.

Prosecutors say they were able to bring the men to justice due to the courage of their victim, who came forward to police and aided in their investigation.

Officials say they encourage all victims of assault and sexual violence to come forward and seek protection from police.