ATASCOCITA, Texas – The gunman involved in a shooting at Atascocita High School that left a 16-year-old student injured has been identified, according to the Harris County Sheriff's Office.

Deputies said 17-year-old Mikael Neciosup has been taken into custody and charged with aggravated assault in connection to the shooting. Neciosup went before a judge Friday afternoon where prosecutors laid out the case against him. His bond was set at $40,000.

Authorities said the shooting happened around 6:15 p.m. Thursday in the high school parking lot.

Sheriff Ed Gonzalez said the victim was shot while trying to buy marijuana from Neciosup, who is a student in Humble ISD.

"This appears to have stemmed from a narcotics transaction," Gonzalez said. "so there is no broader concern to the school. This was an individual type of interaction, so we do want to make sure we're very clear on that. But also, these young individuals need to know that there is definitely a consequence to their actions."

WATCH: Atascocita shooter posts to Snap Chat after shooting at high school

After the shooting, Gonzalez said Neciosup posted a video on SnapChat smoking and boasting about the incident, and investigators were able to confirm his identity.

About 85 students were on campus for after-school activities when the shooting happened, officials said.

The 16-year-old student suffered non-life-threatening wounds and was conscious and talking when he was taken to an area hospital. He was struck in the foot and grazed across the torso, authorities said.

No one else was injured in the shooting, according to officials.

Officials said Neciosup posted a video to Snapchat after the shooting.

Harris County officials said Neciosup and another person left the scene in a red Chevrolet Impala. Gonzalez said the other person has been identified and is cooperating with police.

VIDEO: Deputies give update on a shooting that injured one Atascocita student

A woman who lives in the area and did not want to be identified spotted the Impala and called in a tip to police.

"We live in the area, we have small children. He was assumed to be armed and dangerous," the woman said. "He's a teenager who made a brash decision to shoot someone in a school parking lot. What's to say that, if he's running down the street with a gun, that he's not going to do something to someone else out of fear or self-preservation."

Neciosup was arrested during a traffic stop Thursday night, and Gonzalez said a gun was found in the vehicle.

Willenette August said her son and the victim are best friends. August said her son witnessed the shooting, but wasn’t hurt. He is also cooperating with police.

“It’s just frightening, really frightening. We are saying prayers for him,” August said.

Neciosup is being held without bond.

The district has not yet determined how it will punish the students.