A US Navy sailor who fatally shot two people at Pearl Harbor before killing himself was unhappy with his commanders and had been undergoing counselling.
Gabriel Romero, 22, also faced non-judicial punishment, which is a lower-level administrative process for minor misconduct, a military official said on Friday.
He used his two service weapons in the attack.
Romero also wounded a 36-year-old man at the naval shipyard within the storied military base before turning the gun on himself, authorities said. That victim is in stable condition at a hospital.
In a second attack at a Navy base this week, a shooter opened fire in a classroom building on Friday at Naval Air Station Pensacola in Florida - leaving four dead and multiple people wounded.
The suspect, who also shot himself dead, has been identified as a member of the Saudi Air Force visiting the United States for military training.
The Pearl Harbor shooting came just days before a ceremony to remember those who perished in the Japanese bombing 78 years ago.
Security will be beefed up as usual for the annual event expected to draw survivors, veterans, dignitaries and others on Saturday to honour more than 2,300 Americans killed on December 7, 1941.
Military officials said on Friday they had not yet found a motive for the shooting but there was no evidence of domestic terrorism.
They said the isolated attack, witnessed by shipyard employees in an area with thousands of workers, unfolded in about 23 seconds.
Romero, who was from Texas and enlisted in the Navy two years ago, was dead when authorities arrived.
He was armed for his job standing watch and providing security for fast attack submarine USS Columbia, which is at Joint Base Pearl Harbor-Hickam for maintenance.
Retired Army Colonel Gregory Gross, a former military judge, said just because Romero faced non-judicial punishment doesn't automatically mean he should have been taken off watch duty.
It was not known if Romero knew his victims, Roldan Agustin, 49, and Vincent Kapoi Jr, 30.
The Pensacola shooter was killed by sheriff's deputies responding to the dawn incident, the Navy and local sheriff's office said.
Florida Governor Ron DeSantis said the suspect was a Saudi national attending training as part of a long-standing Navy program open to US allies.
President Donald Trump said Saudi Arabia's King Salman called him to offer condolences and sympathy to the victims.