Commanding officer of the USS Maham, Cmdr. Zoah Scheneman, at podium, addresses the media during a press conference in front of the ship at Naval Station Norfolk in Norfolk, Va., Wednesday. The Navy identified the sailor who was killed Monday night aboard the ship as Petty Officer 2nd Class Mark Mayo of Hagerstown, Md.

NORFOLK, Va. — The sailor who was slain during a shootout aboard a guided-missile destroyer at a Virginia base saved another sailor’s life by jumping between her and a civilian gunman who was trying to board the ship, Navy officials said Wednesday.

The Navy identified the slain sailor as Petty Officer 2nd Class Mark Mayo during a news conference, saying he acted heroically when the civilian approached the USS Mahan shortly after 11 p.m. on Monday. The civilian gunman, who was also killed in the shootout, hasn’t been identified.

The truck driver used a legitimate transportation worker’s credential to get onto Naval Station Norfolk, although officials say he didn’t have a reason to be on the world’s largest naval base on Monday night. The Navy hasn’t said why the truck driver was trying to get onto the ship, but officials have ruled out any link to terrorism and say there is no evidence to indicate a pre-planned confrontation.

He parked his tractor-trailer cab near Pier 1, was able to walk onto the pier and began heading up a ramp toward the USS Mahan when he was confronted by Navy security, said Mario Palomino, the Naval Criminal Investigative Service special agent in charge of the Norfolk field office.

The man then got into an altercation with a female petty officer and disarmed her, Navy officials said. Palomino said Mayo stepped over the disarmed officer and fired his weapon at the assailant. He was the installation’s chief of the guard and came to help once he saw the civilian board the ship.

Multiple pistol rounds were fired between the gunman and Navy security forces responding to the scene, Palomino said. The Navy has said previously that the truck driver fired the shot that killed Mayo.

The base’s commanding officer, Capt. Robert Clark, said Mayo’s actions to protect the disarmed officer were extraordinary.

“He basically gave his life for hers,” said Clark said during a news conference.

Mayo, a 24-year-old master-at-arms from Hagerstown, Md., joined the Navy in 2007 and had previously been stationed in Bahrain and Rota, Spain before coming to the Norfolk base in 2011.

On Wednesday, the Navy appointed Rear Adm. Jeffrey Harley to lead an investigation into the circumstances surrounding the shooting. Harley’s role will be different from that of criminal investigators, and will include a review of base procedures, according to the Navy.

To get onto the base, civilians must be escorted or have identification that allows them to be there. Clark said the gunman was found with a TWIC card, a transportation worker’s credential issued by the Transportation Security Administration to personnel such as truck drivers who require unescorted access to secure areas.

He said investigators were looking into why the truck driver was allowed onto the base when he didn’t have a reason to be there that night. The base is reviewing its security procedures.

“If I find the procedures were not adhered to, I will take immediate and appropriate corrective action. The security of this installation is my highest priority,” Clark said.