Military officials said a U.S. sailor fatally shot two civilian employees and injured a third Wednesday at the Pearl Harbor shipyard in Hawaii before taking his own life.

>> Read more trending news

Update 3:35 p.m. EST Dec. 6: Authorities on Friday identified two civilians killed Wednesday by a Navy sailor at the Pearl Harbor shipyard in Hawaii.as metals inspector apprentice Vincent J. Kapoi and shop planner Roldan A. Agustin, both of Hawaii.

Officials said Kapoi and Agustin died after being shot by machinist’s mate auxiliary fireman Gabriel Antonio Romero, of Texas. Romero, who was assigned to the USS Columbia, also injured one other person before turning the gun on himself.

Citing witness statements, Norman Dominesey, NCIS special agent in charge, said the incident spanned just 23 seconds.

An unidentified military official told The Associated Press that Romero, 22, had been undergoing counseling and had expressed dissatisfaction with his commanders before Wednesday's shooting. He had also faced non-judicial punishment, a lower-level administrative process for minor misconduct, according to the AP.

Dominesey told reporters Friday that Romero was armed for his duties Wednesday while serving as a watchstander when he opened fire in dry dock 2. Authorities said they were investigating why Romero was allowed to be armed while on duty.

Authorities were also working Friday to determine a possible motive in the shooting. Eli Miranda, special agent-in-charge of the FBI’s Hawaii field office, said that as of Friday, the attack had not been linked to any particular ideology. Dominesey said no other people were believed to be involved in the incident.

The shooting happened two days before a gunman opened fire in a separate shooting at Naval Air Station Pensacola. Authorities in Florida said the gunman shot several people Friday, three fatally, before responding sheriff’s deputies shot and killed him.

“It’s been a tough few days for our Navy family, so keep them in your prayers this holiday season,” Miranda said.

Authorities continue to investigate.

Update 3 p.m. EST Dec. 6: Authorities in Hawaii are holding a news conference Friday to share updates on the investigation into Wednesday's deadly shooting at the Pearl Harbor shipyard.

Update 2:30 p.m. EST Dec. 5: Citing an unidentified military official, The Associated Press reported the shooter who killed two people and injured a third Wednesday at the Pearl Harbor Naval Shipyard was 22-year-old G. Romero.

The Honolulu Star-Advertiser identified the shooter as Gabriel Romero and reported he had been assigned to the USS Columbia, a submarine based at Pearl Harbor.

Authorities have not yet released the names of those injured or killed in Wednesday's attack. However, Tara Kapoi told the AP her husband, 30-year-old Vincent Kapoi Jr., was one of the two people killed. Hawaii News Now reported the injured victim, a 36-year-old man, remained in guarded condition Thursday at Queen's Medical Center.

The motive behind the shooting remained unclear Thursday. Officials previously told reporters it was unclear whether the shooter knew the victims.

“We have no indication yet whether they were targeted or if it was a random shooting,” said Rear Adm. Robert Chadwick, commander of Navy Region Hawaii.

Original report: The military didn't release a motive or any identifying information about the sailor who opened fire. A third victim is at a hospital.

Navy Rear Adm. Robert Chadwick, the commander of Navy Region Hawaii, said he didn’t know what type of weapon the shooter used. He said people aren’t authorized to bring their personal weapons on base.

Queen’s Medical Center spokesman Cedric Yamanaka said the hospital was treating a male patient but didn’t give details on his condition.

Joint Base Pearl Harbor-Hickam spokesman Charles Anthony confirmed that there was an active shooting at Pearl Harbor Naval Shipyard. The military tweeted that it began around 2:30 p.m.

The base has tweeted that the gates and base can be accessed again following a lockdown.

The shipyard is across the harbor from the Pearl Harbor National Memorial, which on Saturday will mark the 78th anniversary of the attack by Japan that propelled the U.S. into World War II.

Pearl Harbor houses the headquarters for the U.S. Pacific Fleet and is the home port for 10 destroyers and 15 submarines.

The Associated Press contributed to this report.