Matthew Barakat / AP
The entrance to Marine Corps Base Quantico in Northern Virginia is shown early Friday after three Marines, including the suspected assailant, died in a shooting.
By Courtney Kube and John Newland, NBC News
A Marine opened fire on two of his comrades Thursday night at a base in Quantico, Va., before turning the gun on himself, leaving all three dead, military officials said.
A relationship dispute was believed to be behind the shooting, which occurred in the staff barracks area of the Officer Candidates School at Marine Corps Base Quantico in Northern Virginia, a Marine official said.
The assailant and both victims, a man and a woman, were staff members at the school and not students,, a senior defense official said. The official called the incident "isolated," adding: "There was nothing random here."
The names of the dead were being withheld pending notification of next of kin.
Military police and Prince William County, Va., Sheriff's Department officers responded to a report of gunshots about 11 p.m. ET Thursday and found one Marine dead and the shooter barricaded inside the barracks, a Marine official said. The barricade lasted until 3 a.m., when officers entered the barracks and found two more bodies, including that of the shooter, the official said. All three were pronounced dead at the scene.
The assailant appeared to have died from a self-inflicted gunshot wound, base officials said.
The base had been under lockdown after the incident, but its status early Friday returned to "Code Green," meaning operations were normal.
A message posted on Quantico's Facebook page?had earlier had told residents to remain in their homes with their doors locked.
Quantico is about 40 miles south of Washington in the Northern Virginia suburbs.
The Officer Candidates School calls itself "the first proving ground for future Marine officers." Its graduates attain the rank of 2nd lieutenant.
It has a reputation for being challenging.
"The mission of OCS is to train, screen and evaluate candidates, who must demonstrate a high level of leadership potential and commitment to success in order to earn a commission," the Marine Corps says on the school's website. "Officer Candidates School training will be more demanding than any you've experienced before, regardless of commissioning program."
NBC News' Denise Ono and Christopher Nelson contributed to this report.
This story was originally published on Fri Mar 22, 2013 2:17 AM EDT