The Hennepin County Attorney's Office charged two teens Tuesday in connection with a stabbing and gunshots fired at Washburn High School during Somali Culture Night last week.

A 17-year-old boy from St. Cloud faces second-degree assault in the stabbing of another young man in the back, and a 16-year-old Minneapolis boy is charged with felony gun possession in connection with shots fired at least three times at the after-school event May 25. Videos posted to social media and witness photos aided in the investigation, according to the charges.

The Star Tribune is not naming the teens, who were charged by juvenile petition.

Neither of the teens arrested Thursday night after the violence erupted attend Washburn in south Minneapolis, Principal Emily Lilja Palmer said in a message to the school community Friday. Palmer said the two injured didn't attend the school either.

A 16-year-old boy suffered a stab wound that was not life-threatening.

He told police that a fight broke out between two people behind him in the auditorium, according to the charges. One of the boys pulled out a knife and stabbed him. But when the victim saw the boy swing the knife around, he thought he must have stabbed other people because the victim "was not involved in the fight and did not know why the male stabbed him in the back," charges say.

Police saw videos posted to Twitter that showed the victim falling to the ground after he was stabbed. The video also showed a school staff member "trying but failing to stop [the suspect] from attacking others," charges say.

The suspect was hiding nearby when arrested by officers with the assistance of a police dog. Charges say he had a knife in his pocket and was wearing the same clothes as in the video.

He told police that someone in the auditorium started fighting with his friend and other people joined the fight and attacked him. He said he pulled out his knife in self-defense.

When he was arrested, the suspect had a black eye. "He told police that his stomach hurt from running from guys who had a gun, which is why he pulled out his knife," the charges added.

Police arrived around 7:50 p.m. on reports of a stabbing. It wasn't until police were at the school that gunshots were fired. Officers heard three shots from outside near the school and saw two young men standing nearby.

A bystander told officers that the two boys were involved in the shooting, but when officers ordered them to show their hands, the pair fled in different directions, charges say.

An officer arrested one of the boys at gunpoint, charges say. A firearm was recovered.

A witness showed police a photo he took of the suspect wearing the same clothing while "running away from the camera and holding a pistol in his right hand," charges added.

Officers located three discharged cartridge casings on the ground near the school.