A Navy sailor who opened fire at the Pearl Harbor Naval Shipyard in Hawaii on Wednesday has been identified as Gabriel Antonio Romero, the Navy confirmed to Fox News on Thursday.

Romero, a Texas native and machinist's mate auxilliary fireman, was just a week shy of his two-year anniversary with the Navy when the incident occurred. He died from a self-inflicted gunshot wound, the Navy confirmed.

SAILOR AT PEARL HARBOR NAVAL SHIPYARD KILLS 2 CIVILIANS BEFORE TURNING GUN ON HIMSELF, REPORT SAYS

The shooting took place near the USS Columbia, a Los Angeles-class attack submarine, which Romero had been stationed at since June 28, 2018.

The submarine, homeported in Pearl Harbor, remains in dry dock at the Pearl Harbor Naval Shipyard for routine maintenance.

The shooter was an active-duty U.S. Navy petty officer attached to the submarine, according to a Navy official.

Romero shot three civilians before turning the gun on himself. The Navy identified the victims as Vincent J. Kapoi and Roldan A. Agustin, both Hawaii natives who worked at the base.

CLICK HERE FOR THE FOX NEWS APP

Kapoi was a metals inspector apprentice through the shipyard's Intermediate Maintenance Facility Apprentice Program. Agustin was a shop planner.