A former New York City police detective who fought to extend health benefits for first responders to the Sept. 11, 2001 terror attacks up to the final days of his life was hailed as a hero at his funeral Wednesday.

Luis Alvarez, 53, died Saturday after a three-year battle with colorectal cancer, an illness he attributed to the three months he spent digging through the rubble of the World Trade Center.

HERO 9/11 FIRST RESPONDER MAKES EMOTIONAL PLEA IN HIS 'FINAL INTERVIEW' FROM HOSPICE CARE

Police Commissioner James O’Neill said Wednesday that Alvarez was one of many first responders who did not hesitate to serve following the terrorist attacks.

“These heroes responded to calls for help. They did not hesitate. That’s who they were and still are,” Police Commissioner James O’Neill said during the service at the Immaculate Conception Church in Queens. "He and they viewed their efforts as an obligation that they promised long ago to the people we serve."

The Star-Spangled Banner played as hundreds of uniformed officers stood at attention outside the church and police helicopters soared overhead. Hundreds of NYPD officers saluted Alvarez's flag-draped casket as it was brought into the church before the service.

Following the service, pallbearers in police uniforms carried out the coffin. Officers watched in formation as the hearse slowly drove away, carrying Alvarez's body to a private burial service.

In June, Alvarez appeared before the House Judiciary Committee with former "Daily Show” host Jon Stewart to plead for a bill that would extend the Sept. 11 Victim Compensation Fund, which has been largely depleted. Stewart was among those at the service Wednesday.

“I did not want to be anywhere else but ground zero when I was there,” Alvarez said at the hearing. “Now the 9/11 illnesses have taken many of us, and we are all worried about our children, our spouses and our families and what happens if we are not here.”

O’Neill said more than 200 police who responded to 9/11 have died from serious illnesses in the years since the terrorist attacks. Researchers continue to study whether there is a link between cancer and toxins present during the cleanup.

"Tomorrow, that number could rise," he said. "In the years ahead, it surely will."

“Luis could have spent his last days and weeks and hours with his family and loved ones, he chose to spend it making a difference,” said John Feal, founder of the Feal Good Foundation, which chose Alvarez to speak before Congress. "We're here to mourn today, but tomorrow we're back to fighting again ... He’s going to be with us when we’re back in D.C. We’re going to wear him on our sleeve."

After Alvarez and Stewart’s emotional testimony before Congress, the House Judiciary Committee voted in support of a measure that would extend funding through fiscal year 2090. The bill is awaiting a full House vote.

Rep. Alexandria Ocasio-Cortez, D-N.Y., tweeted her condolences, noting: “Some issues should be above partisanship or delay. We must pass the bill as soon as Congress reconvenes.”

Alvarez was born in Havana and raised in Queens. He served in the Marines before joining the NYPD in 1990 and spent time in the narcotics division and the bomb squad. His survivors include his parents, wife, three sons and three siblings.

CLICK HERE TO GET THE FOX NEWS APP

"Before he became an American hero, he was mine," said Alvarez's son, David.

Alvarez's sister Aida Lugo said that on the night before her brother died, he "told me he had been walking, and walking, and walking." When someone asked where he had been walking, Lugo said: "My brother responded, 'I was walking to find first responders to make sure they get help.'"

The Associated Press contributed to this report.