Hundreds of current and former NYPD officers paid tribute Thursday to a retired detective and World War II veteran who died alone, a day after the department asked that the community unite to give him a hero's farewell.

William Brown died last month at the age of 95. He had no friends or family by his side, and his body was discovered by police officers from the 113th Precinct who befriended him over the winter, the NYPD said.

But he was not without friends and family on Thursday. First Church of God in Christ in Jamaica was overflowing with people who joined to celebrate Brown's life; officers in their dress blues packed every pew. Some had to stand.

"Detective Brown embraced life, and he would be touched by the sea of blue here today," Deputy Inspector Frederick Grover of the 113th Precinct said.

It's possible the touching turnout would never have happened had it not been for a call to 311 last winter from a concerned neighbor. Brown hadn't been heard from amid freezing temperatures, and it turned out he was in the hospital with hypothermia after his heater broke.

Officers with the 113th Precinct were assigned the case and quickly found out he was a retired cop, joining the NYPD after serving in the Army with the 369th Infantry Harlem Hellfighters.

They fixed the heat in his home, made weekly visits and took him to the doctor's appointments. The seeds were planted for a beautiful friendship.

Det. Tanya Duhanne said the officers decided to plan his funeral after he died, and police and firefighters responded in force to a Facebook post the NYPD put up Wednesday asking for the community to "give Mr. Brown the hero send-off he deserves."

"We knew he didn't have a children, he did not have a wife," said Duhanne. "He didn't have friends he was close with, so we had to do that."

Rev. William T. Armstead said of Brown after the service, "He was energetic, he was private, he was humble. But he lived a life of service and sacrifice."

"'If you don't use it, you lose it!' That was one saying he would always say to us," said Detective Ferguson, one of the community officers who befriended him. "He was always very humble. Once you meet Mr. Brown, you will never forget him."

After the service, a lone bagpiper played "Amazing Grace" as the NYPD Honor Guard escorted Brown's flag-draped casket from the church.

Police officers and firefighters lined the street, giving Brown one last salute as his casket was placed in the hearse.