REDWOOD CITY (BCN)—A Daly City man was sentenced in a Redwood City courtroom today to 28 years in prison for stabbing a high school student outside his school in 2013, San Mateo County prosecutors said.

Erik Montes, 21, was sentenced by Judge Joseph Scott for stabbing a 17-year-old high school student outside Daly City’s Thornton Continuation High School at 1:30 p.m. April 15.

That day Montes and two accomplices parked their car about a block from the school, according to prosecutors. When the victim was outside among a group of people, Montes went up to the boy and stabbed him in the neck, head, hand, torso and arm.

The accomplices, Michael House and Christopher Merlo, kicked and punched the victim after he fell to the ground.

The boy was rushed to a hospital where he underwent emergency surgery and survived, prosecutors said.

San Mateo County District Attorney Steve Wagstaffe said the only motive prosecutors were able to identify was violence between gangs.

Wagstaffe said the victim was not in a gang but associated with gang members.

On the seventh day of a jury trial in April of this year, Montes pleaded no contest to attempted murder and admitted causing great bodily injury and being a gang member. He also pleaded no contest to three other felonies including two counts of felony threats on police officers, according to prosecutors.

Montes was to be sentenced on June 23, but on that day he made a motion to replace his court-appointed private defender with an attorney he retained.

Montes and his new attorney Dek Ketchum made a motion to withdraw the no contest plea because they said private defender Jonathan McDougall was incompetent and coerced Montes into making the plea.

Scott allowed Ketchum to replace McDougall but rejected Montes’ motion to withdraw his plea, after finding that McDougall did not coerce Montes.

Ketchum called the case tragic but would not comment on the fairness of the sentence because he represented Montes late in the case.

He said the victim suffered really serious injuries, which have changed his life.

Merlo will serve five years in prison after pleading no contest to felony assault and admitting to a serious felony, which will count as a strike. He also admitted to being a gang member.

House was sentenced to three years in prison after pleading no contest to felony assault and a misdemeanor charge of being a gang member.

Ketchum said the case epitomizes the violence that occurs in underprivileged communities and the real problem is the underlying cause of the violence.