The Marine who allegedly gunned down two other Marines before killing himself last week was a tactics instructor at the Officer Candidate School in Quantico.

Military officials late Saturday identified Sgt. Eusebio Lopez, 25, as the Marine who shot and killed Lance Cpl. Sara Castromata, 19, and Cpl. Jacob Wooley, 23, on Thursday. Officials did not provide additional details about the connections between them or a motive for the shooting that occurred inside a barracks on the base that is located about 30 miles southwest of Washington.

A senior military official at the Pentagon, speaking on condition of anonymity, has said that the incident may have stemmed from a romantic entanglement. The incident remains under investigation by the Naval Criminal Investigative Service.

All three of the Marines were assigned to the Officer Candidate School at Quantico, which trains those seeking to become second lieutenants.

Lopez, who was from Pacifica, Calif., joined the Marines in 2006 and served a tour in Iraq and two tours in Afghanistan. His military occupational specialty was as a machine-gunner, and he had received numerous military awards, according to base officials.

His relatives did not return phone calls seeking comment Sunday, after military officials identified Lopez as the alleged shooter.

Castromata, of Oakley, Calif., joined the Marines in 2011 and was a warehouse clerk. She had been promoted to lance corporal last month.

Wooley, of Guntown, Miss., was a field radio operator who joined the Marines in 2010. On Saturday, a classmate described him as “loud and hilarious.” Friends and family also said he was deeply religious and had considered becoming a preacher.

“We send our prayers and condolences to the families, fellow Marines and friends of the Marines who were lost in this tragic incident,” the base commander, Col. David W. Maxwell, said in a statement.

T. Rees Shapiro contributed to this report.