WPXI-TV Police outside Brashear High School in Pittsburgh on Wednesday.

A 16-year-old Pittsburgh boy was charged Wednesday night with attempted homicide after three students were shot near their high school just as students were streaming home for the day, authorities said.

All of the victims were described as stable or in good condition after the shootings, which occurred about two blocks from Brashear High School in the Beechview neighborhood of south Pittsburgh about 2:50 p.m. ET, police said.

Anjohnito "A.J." Willet Jr. was charged as an adult with four counts each of attempted homicide, aggravated assault and reckless endangerment, Pittsburgh police Lt. Kevin Kraus told reporters late Wednesday.

Police and SWAT officers converged on two adjacent homes in the area and took Willet and six other people into custody for questioning, Kraus said Wednesday night. The six others, including a small infant, were released without charges.

Investigators believe Willet shot the three students and fired at a fourth in retaliation for his having been beaten during a drug-related robbery at the school Oct. 18, Kraus said. Willet declined to press charges at the time, telling police he preferred to take care of the matter himself, Kraus said.

Willet was also charged with illegal possession of a firearm by a juvenile.

"We believe we have the one and only shooter," Kraus said, adding: "We have no evidence or information whatsoever to believe that there was anything else other than a targeted shooting directly resulting to an October 18 incident in the school amongst high school students."

Diane Richard, a Pittsburgh police spokeswoman, said two of the victims were shot in the shoulder and the foot and that one was grazed in the head. She said that two of them were 17 years old and that one was 16.

The boy who was injured in the head ran back to the school and was pulled inside by administrators, Richard said, which gave rise to inaccurate initial reports that the shootings had taken place on school property.

"There was no shooting at Brashear school," she said.

The reports were "traumatizing," a student at the school said.

"We were driving home from school, and all of a sudden, we heard three gunshots. This kid gets picked up. He was bleeding from his head. There was blood everywhere," the student, who asked not to be named, told NBC station WPXI of Pittsburgh.

Krystal Henson, a senior at the school, told the station: "All I heard were gunshots. I just thought it was kids playing around. My friend said, 'A kid is laying on the ground, and there is blood.' Everyone started running."

Tricia Culligan of NBC News contributed to this report.

Watch US News crime videos on NBCNews.com

This story was originally published on