A Las Vegas teenager was sentenced to between 16 and 40 years in prison in connection with an attack on a high school teacher after classes ended for the day that left her with several injuries. 

Jonathan Martinez Garcia, now 17, pleaded guilty to attempted murder and in April to attempted sexual assault and battery with use of a deadly weapon resulting in substantial bodily harm in a plea deal that avoided trial in the after-school attack at Eldorado High School.

SUSPECT IN VEGAS TRIPLE HOMICIDE CASE HELD WITHOUT BOND

Garcia apologized in court Wednesday. His lawyer told a judge that his client's behavior was caused by severe side effects of an asthma medication he took that caused mood changes, night terrors and hallucinations, the Las Vegas Review-Journal reported. 

Las Vegas teacher attacker

Eldorado High School in Las Vegas. A former student attacked a teacher at the school and severely injured her last year. He was sentenced this week to 16 to 40 years in prison.  (Google Maps)

"I regret what I’ve done," Garcia said. "I also regret the things I should have done, but didn’t do."

His attorney asked for probation. 

In April 2022, Garcia attacked the teacher in a classroom and choked her with a "rope or string" and then slammed her head against the table and knocked her unconscious. He allegedly said he "didn't like teachers" when she asked why he was attacking her. 

CLICK HERE TO GET THE FOX NEWS APP

She eventually went unconscious during the attack before she was found by another school employee. Garcia fled the school but was arrested hours later. 

The Associated Press contributed to this report.