A gravely ill retired FDNY firefighter from Hicksville — who was critical in convincing Congress to continue health benefits for sick 9/11 responders — received the key to New York City on Saturday.

Ray Pfeifer, in a ceremony featuring comedian Jon Stewart, stood from his wheelchair and limped to accept the honor to the applause of hundreds of police, firefighters, elected officials and families of fellow first responders — including some of the thousands who are sick.

“We dealt with people that really didn’t get it,” Pfeifer recalled of trying to convince reluctant senators and members of congress to extend the Zadroga Act benefits for responders suffering from 9/11-related illnesses.

“We held them to it — about never forgetting. We told them, we’re still dying from terrorists. We’re still sick from terrorists,” said Pfeifer, 57, who worked at Ground Zero in Lower Manhattan for months after the Sept. 11, 2001, terrorist attacks. “They started to get it.”

Pfeifer, who worked for the FDNY for 27 years and wore his uniform Saturday, has been diagnosed with stage-four cancer, which means it’s spread elsewhere in his body. He’s lost a kidney and leg, and he has brain tumors.

Congress voted last month to extend the James L. Zadroga 9/11 Health & Compensation Act, named to honor an NYPD officer who died of respiratory disease. The law extends coverage for three-quarters of a century. Among the reasons Republican foes of Zadroga put forward was that those who are sick could get compensated without adequately proving the cause was 9/11 related and that there is a lack of scientific proof of a connection.

Stewart, who devoted parts of his former “Daily Show” to push for the Zadroga bill, joked that Mayor Bill de Blasio was wise to award the key to Pfeifer, not Stewart.

“The key to the city is — it’s a symbol of trust. And I think that if you gave it to me, you’d go to sleep, I’d steal the Chrysler Building. But Ray? You come back the next morning and everything is where you left it and also the dishes are done and the streets are plowed,” the comedian deadpanned during the City Hall ceremony. He described himself as “Ray’s wingman on our trips down to D.C.,” when the men would barnstorm Capitol Hill to lobby enough politicians to pass the bill.

Rep. Peter King attended the ceremony and described Pfeifer as “the face” of the movement to maintain benefits for the sick.

“The guy’s strong,” King (R-Seaford) said after the key presentation. “He’s like a bull!”

Past recipients of keys to the city — a replica of the key to City Hall dating to the 19th century, de Blasio spokeswoman Amy Spitalnick said — and the mold dates to 19th century have included the Dali Lama and New York Yankees.