A news release from Montgomery County Police said security at Magruder High School in Rockville became aware of an incident inside a school bathroom at 12:53 p.m. A male student had been shot and 911 was called four minutes later, the news release said.
The injured student was taken to a hospital, where he was in serious condition and undergoing surgery, police said.
Montgomery County Police Chief Marcus Jones said that the suspect, a fellow student, was taken into custody about two hours after the school was locked down during a search of the building. The chief said the suspect was found with a handgun.
Jones said it wasn't clear what led up to the shooting.
School officials said in the late afternoon that authorities had deemed the school safe and students would be dismissed. County records show the school has approximately 1,700 students. Earlier, television footage had shown numerous squad cars on the scene and officers entering the building.