This is an archived article and the information in the article may be outdated. Please look at the time stamp on the story to see when it was last updated.

A former school bus driver who failed to disclose a medical condition that caused him to have seizures and black out pleaded guilty on Friday to charges in a crash that injured 11 students in Anaheim in 2014.

Gerald Douglas Rupple pleaded guilty to 11 felony counts of child abuse and endangerment and a single felony count of perjury, a courtroom clerk confirmed. He also admitted to four sentencing enhancements for inflicting great bodily injury.

He is set to be sentenced in October.

The felonies Rupple, now 27, pleaded guilty to carry a maximum penalty of 26 years and four months in prison, Judge Sheila Hanson said during the hearing, according to the Orange County Register.

On April 24, 2014, Rupple was transporting 11 students from El Rancho Charter Middle School in Anaheim Hills when the crash occurred and everyone was injured, the Orange County District Attorney’s Office said previously.

Rupple, then 25, was arrested on Jan. 15, 2015, in Arizona. The California Highway Patrol, which investigated the case, returned him to Orange County the next day.

He was driving the Orange Unified School District bus about 50 mph when he passed out and the vehicle went down a hill without braking, the DA’s office previously said.

The bus veered off Nohl Ranch Canyon Road and crashed into several trees. Everyone on board, including Rupple, was hurt.

Four students had major injuries including fractured bones, intracranial hemorrhaging, a shattered spine, and one had to have his or her toe amputated, according to the DA’s office.

Rupple, who is from Ajo, Arizona, and had worked for the district since 2010, was also critically injured in the crash.

He was accused of having a medical condition causing dizziness, seizures and blackouts and not disclosing his medical history to the school district or the doctor who conducted his fitness exam.

He was initially charged with one felony count each of child abuse and endangerment, perjury by declaration, and a sentencing enhancement for causing great bodily injury.

Rupple, who appeared via video conference because he was at a hospital in Phoenix, is still recovering from a double-lung transplant, his doctor said during the hearing, according to the Register.

Last year, the Orange Unified School District reached a $10 million settlement with the families of five children injured in the crash.