Ray Emory, a Pearl Harbor sailor who stood his ground on Dec. 7, 1941, and shot back at attacking Japanese planes with a 50-caliber machine gun, died this morning after a hospitalization in Boise, Idaho, the Navy said. He was 97.

In June, the longtime Kahala resident said he was moving to Boise to live with family after his wife, Jinny, died unexpectedly May 13.

Before he left, the Navy surprised the former chief boatswain’s mate with a farewell ceremony and honor cordon of sailors that stretched longer than a football field at Pier Bravo 21, where Emory’s ship, the light cruiser USS Honolulu, was moored on the Day of Infamy.

More than 500 sailors were on the pier and “manning the rails” on seven warships. Sailors on the destroyer USS O’Kane gave Emory three “hip, hip, hoorays” as he drove past in a golf cart.

Emory told those gathered that when he decided to move to the mainland, he had thought about Pearl Harbor and his ship, and he told friend and local historian Jessie Higa there was one more thing he wanted to do.

“I said, ‘I’d like to go back down and just (stop) off at Pier 21 and say goodbye to that berth,’” Emory related. “So I’m saying goodbye, but I didn’t expect all of these people to be here. Thank you very, very, very much.”

On the day of the attack, one nearby Japanese plane was hit by something that stopped it in midair and caused it to explode and drop straight down as its prop kept spinning through the air, Emory frequently recalled.

He manned a belt-fed heavy machine gun at one of the best sighting spots in the harbor, according to historian John Di Virgilio.

Crews on that side of the ship, 45 feet off the water, fired thousands of rounds, and five of the last seven torpedo planes were brought down.

Later in life Emory became legendary for waging another battle — this one to add names and other identifying information to the graves of “unknown” casualties from the Dec. 7, 1941, attack buried at Punchbowl cemetery.