The shootings took place inside a barracks, Taylor Hall, on the sprawling Marine Corps base here, said the base commander, Col. David W. Maxwell.
The names of the dead were not immediately released, nor did Colonel Maxwell suggest a motive, pending what he said would be “a lengthy investigation.”
Other officials said the episode was not thought to be a mass shooting or terrorist attack.
An official identified the gunman as a sergeant, the male victim as a corporal and the female victim as a lance corporal. The victims, subordinate in rank to the gunman, were most likely in support roles at the school and not involved in training officer candidates, the official said. He would not speculate on a motive but did not rule out that a romantic triangle may have contributed.
“It’s been a long night,” Colonel Maxwell told reporters outside the base before dawn. The shooting was reported about 10:30 p.m. on Thursday, and the authorities responded within minutes, Colonel Maxwell said. Security was tightened throughout the base, with residents alerted by its “giant voice” public address system to remain in their homes with locked doors.
A 2 a.m., the base Facebook page said a suspect had barricaded himself, but Colonel Maxwell later said that there had been no standoff.
A Twitter message from the base’s official account announced a “Code Green” around 2:30 a.m., with “all normal activities cleared to resume.”
The gunman and the female victim were found dead inside a room in the Taylor Hall barracks, said Sgt. Christopher Zahn, a spokesman for the base. The male victim was found earlier at a different location in the same hall.
The mood was somber on and near the base on Friday, with many people describing the Marine Corps as a close-knit community despite its global mission, one already saddened this week by the deaths of seven Marines in an explosion at a weapons depot in Nevada. Officials are investigating the cause of the accident after a mortar round unexpectedly exploded on Monday night during a training exercise.
“It’s a sad moment that lives, once again, are taken and families are going to be hurt,” said Jeff Dandridge, a bus driver who lives just outside the main entrance to the base, which is spanned by a sign reading “Quantico: Crossroads of the Marine Corps.”
Marine Corps Base Quantico, about 35 miles from Washington, is the heart of officer training for the corps and includes not just the Officer Candidates School, where the shootings took place, but also the Basic School for newly minted officers, the Marine Corps War College and the Marine Corps Command and Staff College.
Officer Candidates School is boot camp for college graduates who are vying to become officers, and graduates are commissioned as second lieutenants. Much of their time at the school is spent on physical training, as well as classroom work in leadership, basic military skills like land navigation, and military history.
Much of the training at the school is conducted by sergeants, and Marine Corps officials said the gunman might have had some limited role as a trainer.
At the nearby Stars and Stripes Cafe, Dave Branham and Mack McLaurin, civilian employees of the base on their lunch break, said a sense of vulnerability and loss was pervasive.
“Something like this shows our community, the Quantico community of Marines, is not immune from acts of violence against other human beings,” Mr. Branham said.