St. Mary - Three people, including the assailant, were in critical condition after a shooting at a high school in the eastern US state of Maryland on Tuesday, officials said.

St. Mary's County Sheriff Tim Cameron told the MSNBC television network that the those wounded at Great Mills High School had been taken to area hospitals.

Cameron said the shooter was engaged by the "school resource officer" responsible for security at the school after firing a round at a female student.

Earlier on, reports emerged that a shooting erupted at the high school but the event was quickly "contained," officials confirmed.

St. Mary's County public school also said on its website that the school was on lockdown and the incident had been "contained" but provided no further details.

It said law enforcement was on the scene.

"It happened really quickly, right after school started" after 8:00 am (1200 GMT), Jonathan Freese, a student at the school, told CNN.

"The police came and responded really quickly," Freese said. "They had a lot of officers respond."

"Right now, the police are going through classrooms," he said. "Soon we are going to be escorted from the school."

The Great Mills incident comes about five weeks after a shooting at a Florida high school left 14 students and three adult staff members dead.