A sailor opened fire at a U.S. Navy shipyard at Joint Base Pearl Harbor-Hickam in Hawaii on Wednesday, killing two civilian shipyard employees and wounding another before dying from an apparent self-inflicted gunshot wound, according to a Navy spokesman. Rear Admiral Robert Chadwick said a third civilian employee was being treated for unspecified wounds at a local hospital.

The shooter was an active-duty sailor assigned to the USS Columbia, Chadwick said. It was unclear what type of gun was used or whether the attack was targeted. The victims' names were being withheld pending family notification, according to base officials.

The incident began at Joint Base Pearl Harbor-Hickam at about 2:30 p.m. local time. The base was put on lockdown for about an hour and a half.

Security forces attend to an unidentified male outside the the main gate at Joint Base Pearl Harbor-Hickam, Wednesday, Dec. 4, 2019, in Hawaii, following a shooting. Caleb Jones / AP

One witness told CBS Honolulu affiliate KGMB that he was at his desk when he heard loud pops.

Get Breaking News Delivered to Your Inbox

"I kind of recognize that as gunshots," he said. "I looked out the window, saw three people on the ground. I looked out in time to see the shooter ... shoot himself."

Joint Base Pearl Harbor-Hickam is a combined U.S. Navy and Air Force base located about 8 miles from Honolulu. The shipyard is across the harbor from the National Pearl Harbor Memorial, where the 78th anniversary of the Japanese attack on the base will be marked on Saturday.