GREAT MILLS, Md. -- A teenage girl who was shot when a classmate opened fire inside their Maryland high school has died, authorities said Friday. The St. Mary's County Sheriff's Office said Jaelynn Willey died at 11:34 p.m. Thursday. Earlier that night, her family said she would be taken off life support at the University of Maryland Prince George's Hospital Center. Melissa Willey told news reporters Thursday night that her daughter was brain dead and had "no life left in her."

The mother, holding a young baby, said, "On Tuesday ... our lives changed completely and totally forever. My daughter was hurt by a boy who shot her in the head and took everything from our lives."

The teen was shot Tuesday by 17-year-old Austin Rollins at Great Mills High School in St. Mary's County.

This undated photo provided by the Willey family shows Jaelynn Willey. The Willey family via AP

Rollins died after shooting Willey. A school resource officer got there within a minute and fired a shot at Rollins, but it's not yet clear whether Rollins was killed by the officer's bullet or took his own life.

Get Breaking News Delivered to Your Inbox

The sheriff's office said Wednesday that Rollins and the girl had been in a relationship that recently ended.

"All indications suggest the shooting was not a random act of violence," police said in a statement.

Willey had been in critical condition at the hospital. A fundraising page to help her family has raised more than $77,000.

Willey was one of nine siblings, her mother said, and a member of the swim team.

The shooting broke out just before classes were to begin Tuesday, according to the sheriff's office.

A 14-year-old boy who was shot in the thigh during the encounter was released Wednesday from a hospital.

In an email Thursday to The Associated Press, his mother, Kimberly Dennis, said her family is "eternally grateful" that her son, Desmond Barnes, is "alive, doing well and in good spirits."

She expressed sympathy for Willey and her family and added, "We are also praying for the entire Great Mills High School family and young people around this country. As a community and nation, we must continue to work and fight for a world that is safe for our children."

Great Mills High School has about 1,600 students and is near the Patuxent River Naval Air Station, about 65 miles southeast of Washington.

Sheriff Tim Cameron credited Deputy First Class Blaine Gaskill with preventing any more loss of life.

Cameron said Gaskill, a six-year veteran with SWAT team training, responded within a minute and fired his weapon simultaneously with a final shot fired by Rollins. The officer was unharmed.

On Wednesday, authorities said the Glock handgun used in the shooting was legally owned by Rollins' father. In Maryland it is illegal for anyone under age 21 to possess a handgun unless it is required for their employment.