A Texas middle school student sprang into action and guided a school bus to safety last week after he noticed the driver was suffering a medical emergency.

Six students from La Grange Middle School were on the yellow bus on Thursday when the driver began driving erratically. Karson Vega told FOX7 Austin that he noticed something was wrong just minutes into the ride home.

“He missed a turn and went into a ditch. Then he had to back up, that's when I started thinking... Then he started making circles and stuff. He was going off into a ditch on almost every turn,” the 13-year-old said.

Karson quickly jumped in and called 911 for help. Kyler Buzcek, a sophomore student at a school, stepped in and helped Karson calm the other students on the bus.

“I went and got the little kids. I told them to go to the back because they were sitting there crying and stuff. Then I told the other kid to hang on to them,” Karson recalled.

Karson turned on the bus flashers, jumped into the driver’s lap and drove the bus two miles on Highway 71 to a stop near a bridge above a Colorado River, according to FOX7. Meanwhile, Kyler stayed on the phone with police through the ordeal.

“[The bus driver] wouldn’t take his feet off so I kicked them over a little,” Karson said.

Karson’s mother, Amber Vega, told FOX7 she was proud of her son for remaining calm throughout the incident. She added that it gives her “goosebumps” to think the students could have been hurt if her son didn’t think quickly at the moment.

“We would've all died. Because he was swerving off pretty much into the river and off that hill, too,” Karson said.

The driver was taken to the hospital and is expected to be OK, FOX7 reported. It’s unclear what type of medical emergency he was experiencing.

Karson said he usually doesn’t ride the bus home, but his mother couldn’t pick him up that Thursday.

“There was a reason,” his mother said, “he was on that bus that day.”