Students at Great Mills High School in Lexington Park, Md. barely got their school day started Tuesday when a shooting broke out in one of the school's hallways.

“On this day we realize our worst nightmare our greatest asset, our children were attacked in one of our places, a bastion of safety and security, one of our schools,” said St. Mary's County Sheriff Tim Cameron.

Seventeen-year-old Austin Wyatt Rollins fired at a 16-year-old female student in a hallway around 7:45 a.m., Cameron said. Another 14-year-old male student was also hit during the shooting.

Rollins was confronted by the school resource officer, they exchanged gunfire, and Rollins was later pronounced dead at a local hospital.

According to authorities, Rollins used a Glock semi-automatic handgun. It is not clear at this time how much ammunition he may have had.

Officials stated that it it took less than a minute from the time the shooter opened fired to when the school resource officer opened fire.

RELATED: Sheriff: School resource officer exchanged shots with Great Mills High shooter

The students involved were a freshman and a senior. "There is an indication that there was a prior relationship between the shooter and the female victim," officials stated during a press conference.

The female victim is in critical condition and the male student is in good condition at the MedStar St. Mary's Hospital, located about 15 minutes away from the school. The 16-year-old female has been transported to Prince George's County Shock Trauma. Officials said the shooter died around 10:40 a.m. at a different hospital.

Two witnesses, who do not attend the school, told WUSA9's Mike Valerio that they were on a school bus leaving the high school parking lot when they saw students just running out of the building.

St. Mary's County Sheriff's Office asked parents to stay away from Great Mills High School. They were told to report to Leonardtown High School where the district bussed students to be reunited with their loved ones.

People are taking to Twitter regarding the shooting:

RELATED: Social media reacts to Great Mills High School shooting

Maryland State Police and the ATF said they are helping St. Mary's County Sheriff's Office with the investigation.

Great Mills High School is located about 70 miles southeast of Washington, D.C.

The school will be closed Wednesday and could be closed for the rest of the week.

On Tuesday afternoon, more than a dozen ATF officers were seen leaving Rollins home. Neighbors told WUSA9 they were stunned by the news.

Anyone with information should call the FBI at 1-800-CALL-FBI.

RELATED: Gun used in Great Mills HS shooting first weapon on campus in years, data shows