The US Navy has released the name of a sailor who shot and killed two civilians working at Hawaii's historic military base of Pearl Harbor, and injured a third, before fatally shooting himself.
The shootings came just days before thousands were scheduled to gather at the military base to mark the 78th anniversary of the Japanese bombing that launched the US into the Second World War.
Rear Admiral Robert Chadwick, the commander of Navy Region Hawaii, said the service would evaluate whether security would need to be upgraded ahead of the annual ceremony.
About a dozen survivors of the 1941 bombing were expected to attend, along with dignitaries and service members.
The shooter was identified on Thursday as 22-year-old G Romero, according to a military official who spoke on condition of anonymity.
Rear Admiral Chadwick said he did not know the motive behind Wednesday's shooting at the naval shipyard within the base.
"We have no indication yet whether they were targeted or if it was a random shooting," he said.
The third victim was taken to hospital.
The sailor was assigned to the fast attack submarine USS Columbia, which was Joint Base Pearl Harbour-Hickam for maintenance.
Names of the victims will not be released until next of kin have been notified.
"Our thoughts are with the families of the victims and everyone involved. I can say that we are mobilising support services for naval shipyard personnel as well as everyone else who may be affected by this tragic event," Rear Admiral Chadwick said.
The base went into lockdown at about 2.30pm local time when the first reports were received. The base reopened a few hours later. Witnesses were still being interviewed hours after the shooting.
The shipyard repairs, maintains and modernises the ships and submarines of the US Pacific Fleet, which has its headquarters at Pearl Harbour. The base is the home port for 10 destroyers and 15 submarines. It also hosts Air Force units.
Hawaii had the lowest gun death rate among the US states in 2017, according to the Giffords Law Centre to Prevent Gun Violence.
The islands have strict firearms laws, including a ban on assault weapons and large capacity ammunition magazines.
The shipyard is across the harbour from the wreckage of USS Arizona, which sank in the December 7, 1941, Japanese attack.More than 2,300 Americans were killed in the bombing.
Australian Associated Press