A 12-year-old Texas boy likely saved the lives of his great-grandparents when his older brother started stabbing them in the neck and the head during a car ride, authorities said Monday.

Harris County Sheriff Ed Gonzalez called the boy a "hero" for wrestling a knife from his half-brother, Lucian Johnston, 20, and tossing it out the car window.

Lucian Adrian Johnston.

Johnston was arrested Monday morning and charged with two counts of aggravated assault, authorities said. He was being held in the Harris County Jail, records show.

Sheriff's Sgt. John Klafka said Sunday's assault happened in Katy, west of Houston, after the great-grandmother, 92, and the great-grandfather, 76, drove Johnston to a friend's house. Their names haven't been publicly released.

As they arrived, the woman told Johnston that he was to stay with the friend until he sought an evaluation from a doctor for "behavioral issues," Klafka said.

This "set him off," Klafka said. Authorities said Johnston stabbed his great-grandmother first and then his great-grandfather.

Johnston's younger brother "just reacted," Kafka said. "He started fighting his brother. And he did what he could to help."

Download the NBC News app for breaking news

Johnston is accused of fleeing after the stabbing, and authorities arrested him Monday after he returned to the friend's home where the great-grandparents were taking him.

The 12-year-old boy wasn't injured, Klafka said.

The great-grandfather received two stitches in his neck, and his wife required five staples on the right side of her head. Both were released from a hospital.

The great-grandfather told authorities that he believed that he and his wife would have been killed had the boy not intervened, Klafka said.

Johnston's first court hearing is scheduled for Tuesday. It isn't clear whether he has a lawyer.