The US sailor who shot up the Pearl Harbor Naval Shipyard used his service weapon in the suicidal attack, according to reports.

Petty Officer Gabriel Romero, 22, used his M4 service rifle Wednesday in a shooting spree that left two civilian Defense Department employees dead and a third wounded, according to a preliminary incident report.

He then turned his M9 service pistol on himself, the report said.

Authorities found Romero “deceased at the scene with a self-inflicted [gunshot] wound to the head,” according to the report.

Sources identified Romero as the shooter to Hawaii News Now, which also reported that he recently was compelled to enroll in anger-management courses.

Romero was a crew member aboard the submarine USS Columbia, which was drydocked at the shipyard for maintenance. Fox News reported that he likely opened fire while standing watch near the quarterdeck, the entry point to the sub from the pier.

One of the slain victims was identified by his wife as Vincent Kapoi Jr., 30., The Associated Press reported.

“We don’t know what happened,” Tara Kapoi said Thursday.

The second slain man has not yet been identified.

The wounded victim, a 36-year-old man, remains hospitalized in critical condition.

Authorities are searching for a motive in the attack and investigating whether the victims were targeted or shot at random. It’s not clear how many shots were fired.

The incident happened days ahead of the 78th anniversary of the 1941 Japanese surprise attack on Pearl Harbor, which left more than 2,400 US service members dead.

Rear Adm. Robert Chadwick, commander of Navy Region Hawaii, said the military would determine whether security should be upgraded before the annual ceremony Saturday. About a dozen survivors were expected to attend, along with dignitaries and service members.

The Pearl Harbor shipyard repairs, maintains and modernizes the ships and submarines of the US Pacific Fleet. The base is the homeport for 10 destroyers and 15 submarines.