NEW YORK — An NYPD detective who lost his battle with 9/11-related cancer was laid to rest in August, nearly 20 years after the terror attacks.

Detective George Moreno died on July 30, NYPD Chief of Detectives James Essig said. Before his death, he’d spent three decades as an officer and worked in the NYPD’s narcotics and gang units.

“He was a true hero and will never be forgotten,” Essig said.

Just six weeks before 9/11, Moreno was hit by a bullet that ricocheted off a wall, NYPD Commissioner Dermot Shea said during a Wednesday eulogy. He’d been a cop for just over a decade at that point.

Moreno worked in rescue and recovery operations after the terror attacks on 9/11. He’d gotten up early that day and was set to work in the Bronx, Shea said.

Moreno headed down to Lower Manhattan when he saw news of the attacks on TV.

“He knew it was going to be a long day, but he never imagined it was going to last 20 years,” Shea said.

After 24 hours at Ground Zero, Moreno was sent to a morgue to help identify victims; he spent nine months after sifting through debris from the attack at Fresh Kills in Staten Island, Shea said.

Moreno was unassuming and humble, Shea said.

He was diagnosed with cancer in the summer of 2019.

“The definition of a ‘gentleman,’ George will be missed, but he and his kind heart will never be forgotten,” Shea said.