We now know who killed the gunman who opened fire in a Maryland school shooting earlier this month.

Police said that Austin Wyatt Rollins, 17, shot himself in the head, the Baltimore Sun reported.

Police said Rollins shot Jaelynn Willey in the head just before 8 a.m. at Great Mills High School. The same bullet hit Desmond Barnes, 14, in the leg, multiple media outlets reported.

>> Read more trending news

The Sun reported that Rollins walked through the school and was confronted by a resource officer just after 8 a.m. Deputy First Class Blaine Gaskill's weapon and the Glock 9mm carried by Rollins  went off at the same time. Rollins was found to have killed himself while Gaskill wounded the teen in the hand, the Sun reported.

Willey died this week after being taken off life support, WRC reported. Barnes was treated for his gunshot wound and was released from the hospital.

Barnes, according to WRC, called 911 after being shot and retreating into a classroom for safety.

Willey will be buried Friday in Hollywood, Maryland, WBAL reported.

Related video: 

Girl Shot In Maryland High School Shooting Dies After Taken Off Life Support